-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
92f64c2
:art: Force automerge as admin
flaxel c74078a
:lipstick: Make linter happy
flaxel 6a20dec
:truck: Rename admin variable to force
flaxel 028c008
:art: Change default type for force
flaxel 1100f6a
:memo: Add force documentation
flaxel 3e4253d
:memo: Add hint for prrotection rules
flaxel 9a384b7
:memo: Only run if the PR is created
flaxel 6a25ab1
:arrow_down: More explanation for force merge
flaxel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ In this section you can find examples of how to use template workflows. For more | |
|
||
The action is called by creating a PR. It is necessary that the repository is enabled for auto-merge. | ||
|
||
⚠️ If you want to enable the force merge, make sure that the app can bypass any protection rules. | ||
0x46616c6b marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```yml | ||
name: Enable Dependabot Auto-Merge | ||
|
||
|
@@ -38,6 +40,9 @@ on: pull_request | |
jobs: | ||
dependabot: | ||
uses: Staffbase/gha-workflows/.github/workflows/[email protected] | ||
with: | ||
# optional: ⚠️ only enable the force merge if you want to do the merge just now | ||
force: true | ||
secrets: | ||
# identifier of the GitHub App for authentication | ||
app_id: ${{ <your-app-id> }} | ||
|
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.