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

Add support for merging to restricted branches #106

Merged
merged 6 commits into from
Mar 26, 2019

Conversation

bluekeyes
Copy link
Member

Users can configure a personal access token for a normal user and Bulldozer will use that token to merge into protected branches with push restrictions. This configuration is optional and only used when push restrictions are active.

Fixes #98 and requires #105 to merge first.

README.md Outdated

```yaml
options:
restriction_user_token: <token-value>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think the name should include push to match the existing struct's name: PushRestrictionMerger. Perhaps push_restriction_user_token?

// this is not necessary: the normal client should have delete permissions,
// but having the merge user also delete the branch is a better UX
if restricted {
return m.Restricted.DeleteHead(ctx, pullCtx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it would be valuable here to also log that we're performing a delete action and split it out by adding if we're using the restricted user token or not?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action is logged by the calling code, but I'll add a message about which client was selected.

Copy link
Member

@jmcampanini jmcampanini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Users can configure a personal access token for a normal user and
Bulldozer will use that token to merge into protected branches with push
restrictions. This configuration is optional and only used when push
restrictions are active.
@bluekeyes bluekeyes force-pushed the bkeyes/oauth-tokens branch from 744ba82 to 2029be7 Compare March 26, 2019 18:04
@bluekeyes bluekeyes changed the base branch from bkeyes/refactor-merges to develop March 26, 2019 18:04
@bluekeyes bluekeyes merged commit 432b45e into develop Mar 26, 2019
@bluekeyes bluekeyes deleted the bkeyes/oauth-tokens branch March 26, 2019 18:24
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.

3 participants