Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
askreet opened this issue Jun 28, 2022 · 0 comments
Open

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

askreet opened this issue Jun 28, 2022 · 0 comments
Labels

Comments

@askreet
Copy link

askreet commented Jun 28, 2022

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 askreet added the bug label Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant