Skip to content

Implement remote and default config loading #264

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

Merged
merged 1 commit into from
Oct 27, 2021
Merged

Conversation

bluekeyes
Copy link
Member

@bluekeyes bluekeyes commented Oct 23, 2021

Use the go-githubapp/appconfig package to support remote configuration
references and organization-level defaults. To make this simpler to
implement, there are two changes to existing behavior:

  1. If any config is invalid, Bulldozer stops processing the PR and logs
    a warning. Previously, it would fall back to global config (if set)
    in this case.

  2. All defined config paths may contain either v1 or v0 configuration.
    Previously, some paths could only contain one version or the other.
    Since v0 config is undocumented and has been deprecated for a
    long time, I don't expect this to impact anything.

I also did some refactoring, moving the fetching logic to the handler
package while leaving the parsing logic in the bulldozer package. This
mirrors the layout in policy-bot.

Use the go-githubapp/appconfig package to support remote configuration
references and organization-level defaults. To make this simpler to
implement, there are two changes to existing behavior:

1. If any config is invalid, Bulldozer stops processing the PR and logs
   a warning. Previously, it would fall back to global config (if set)
   in this case.

2. All defined config paths may contain either v1 or v0 configuration.
   Previously, some paths could only contain one version or the other.
   Since v0 config is undocumented and has been deprecated for a
   long-time, I don't expect this to impact anything.

I also did some refactoring, moving the fetching logic to the handler
package while leaving the parsing logic in the bulldozer package. This
mirrors the layout in policy-bot.
@bluekeyes bluekeyes requested a review from a team October 23, 2021 00:12
@bluekeyes bluekeyes merged commit 6df0106 into develop Oct 27, 2021
@bluekeyes bluekeyes deleted the bkeyes/appconfig branch October 27, 2021 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants