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

🎨 Force automerge as admin #199

Merged
merged 8 commits into from
Nov 15, 2023
Merged

🎨 Force automerge as admin #199

merged 8 commits into from
Nov 15, 2023

Conversation

flaxel
Copy link
Contributor

@flaxel flaxel commented Nov 9, 2023

Type of Change

  • Bugfix
  • Enhancement / new feature
  • Refactoring
  • Documentation

Description

  • force automerge as admin

Checklist

  • Add relevant labels (for example type of change or patch/minor/major)
  • Make sure not to introduce some mistakes
  • Update documentation
  • Review the Contributing Guideline and sign CLA
  • Reference relevant issue(s) and close them after merging

@flaxel flaxel added enhancement New feature or request minor Pull requests with new features labels Nov 9, 2023
@flaxel flaxel marked this pull request as ready for review November 9, 2023 19:01
@flaxel flaxel requested a review from a team as a code owner November 9, 2023 19:01
@flaxel flaxel requested a review from 0x46616c6b November 9, 2023 19:01
axdotl
axdotl previously requested changes Nov 10, 2023
gh pr merge --auto --merge "$PR_URL"

if [ ${{ inputs.force }} == 'true' ]; then
gh pr merge "$PR_URL" --merge --admin
Copy link
Member

Choose a reason for hiding this comment

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

This will actually bypass all rules. Means also when another workflow fails it could lead to a merge. Or did I miss something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah correct and that's the cause why I add two warnings. 🙌 But additionally you need to configure it in your repo so you can bypass any protection rules.

Copy link
Member

Choose a reason for hiding this comment

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

TBH: I'm not happy with this. For example: I consider the warnings but decide to enable this feature. The next ten updates run totally fine. But a few months later this workflow will break the main branch of my repo, because of a breaking update. I might not notice this, because in the meantime I'm working on a different service.

I think the feature in its current implementation adds more risk than value.

Copy link
Contributor Author

@flaxel flaxel Nov 10, 2023

Choose a reason for hiding this comment

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

I guess this is an implementation detail how the repo owners use the workflow. I would recommend to use it as a last step of the pipeline,so the issue should never happen.🤔 We would use it f.e. in the alarm tool where we already have auch logic.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha - let's get another review from @0x46616c6b, as I like to have his view on this.

Copy link
Contributor

@0x46616c6b 0x46616c6b left a comment

Choose a reason for hiding this comment

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

Please provide a more detailed outline of the consequences for the "force" option.

README.md Outdated Show resolved Hide resolved
@flaxel flaxel requested review from axdotl and 0x46616c6b November 13, 2023 13:06
@flaxel flaxel dismissed axdotl’s stale review November 15, 2023 10:03

talked about it and we can merge the PR

@flaxel flaxel merged commit 4104f83 into main Nov 15, 2023
2 checks passed
@flaxel flaxel deleted the force-automerge-admin branch November 15, 2023 10:04
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request minor Pull requests with new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants