app icon indicating copy to clipboard operation
app copied to clipboard

It is not possible to un-set topics using settings.yml.

Open askreet opened this issue 3 years ago • 0 comments

Problem Description

Because of the way topics are handled here, there is no reasonable way to specify an empty set of topics should you want to remove the only topics from a repository using this bot.

What is actually happening

An empty string or empty list is falsey in JavaScript and results in the update API not being called.

What is the expected behavior

I should be able to set a repositories topics to an empty set.

As a user, I was originally surprised the API in settings.yml isn't:

repository:
  topics: [ topic1, topic2 ]

And then:

repository:
  topics: []

That would make this code simpler and more flexible to this use case. A fallback case could check for a string value and implement the current split logic.

Error output, if available


Context

Are you using the hosted instance of probot/settings or running your own?

I'm using the hosted instance.

If running your own instance, are you using it with github.com or GitHub Enterprise?

Version of probot/settings

Version of GitHub Enterprise

askreet avatar Jun 28 '22 17:06 askreet