config: allow config filename per repo - #151
Open
Khady wants to merge 1 commit into
Open
Conversation
Khady
commented
Jun 2, 2024
Comment on lines
+38
to
+39
| match get_secrets_exn ctx with | ||
| | exception Context_error _ -> ctx.config_filename |
Contributor
Author
There was a problem hiding this comment.
I think that it would be better without this catch, but the tests are failing if I omit it.
Contributor
|
i think we don't need this configurable at all, just pick some name, |
Contributor
|
oh i see, the request is to have it without the dot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the config filename is set globally for all the repository. It's not really convenient because it doesn't allow any exception, and if one wants to change the filename it has to be done for all the repositories.
The existing code is a bit disorganised too. For example the default config name exists in two places with different values:
monorobot/src/monorobot.ml
Line 87 in d52a846
monorobot/lib/context.ml
Line 19 in d52a846
This PR adds yet another place where this can be set. In the repo config which lives in the secrets. It's not really a secret but I didn't want to introduce an extra file for this feature.
I also thought about supporting a list of names instead of a single one. But it triggers even more changes, especially in places where there are queries done to the github api. So I decided against it for now at least.