feat: configure excluded repositories and commands - #56
Conversation
timja
left a comment
There was a problem hiding this comment.
I think this needs to be a bit more powerful, i.e. I don't think anyone would object to reviewers being requested.
It should have multiple levels,
e.g.
- repo
- repo:command
- repo:command1,command2
Along with tests and the code itself shouldn't be in the router it should be in it's own file which can be tested more easily
Another option, could be to use https://github.com/probot/octokit-plugin-config as it provides config at a repository level. Potentially also at org level via This only provides a config at deployment of application. |
timja
commented
Jul 25, 2022
Looks interesting does that mean it loads single files from github? I get that doesn't use API limits. Not currently using probot here FWIW. |
Yes it can load a single yml config file and parse it to a object with sensible defaults. See release-drafter for usage: https://github.com/release-drafter/release-drafter/blob/master/lib/config.js This is only partly related to probot. This is an octokit plugin. So since your using octokit, you can use it. |
lemeurherve
commented
Jul 25, 2022
That's why I went with an env var, easy to configure at the org/app level, to avoid fetching a file every time.
Totally, will fixes my other fr. |
jetersen
commented
Jul 25, 2022
@lemeurherve problem I can add jenkinsci deployment of github-comment-ops to any github org. |
lemeurherve
commented
Jul 25, 2022
I might miss something but if people want to use this app in their org they can deploy the chart to setup their instance as they please? |
jetersen
commented
Jul 25, 2022
lemeurherve
commented
Jul 25, 2022
To be able to configure their own exclusions? 🤷 |
With environment variables they cannot. With a config file in a repository they could. |
I think a config file would give us the flexibility we need, org level defaults and then allow repository overrides, something like: config:
commands:
- name: transferpermission: memberenabled: true
- name: labelspermission: memberallowed_labels: ['enhancement', 'chore', 'bug']enabled: true
- name: closeenabled: false
- name: reopenenabled: false |
jetersen
commented
Jul 25, 2022
Yup this would work because configs are deep merged :) An array would be perfectly merged with defaults in the org. |
timja
commented
Jul 26, 2022
I've started this approach here: |
lemeurherve
commented
Jul 26, 2022
Closing in favor of #60 |

Ref: #54
I'm proposing to define excluded repositories with an env var containing the list of excluded repositories separated by a comma.
(PR in draft, need to add the corresponding value to the chart)
To exclude a repo, an help desk issue could be opened to add the repo name to this env var.
WDYT @timja@dduportal@daniel-beck