-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[AI] Github action for unfreezing PRs #7094
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ccba224
[AI] Add GitHub Action to add PR to Merge Freeze unblocked list when …
MatissJanis 8a618e6
Rename 7093.md to 7094.md
MatissJanis c285550
Add concurrency control to unfreeze job in merge-freeze-unfreeze work…
MatissJanis b23a69b
Merge branch 'matiss/merge-freeze-unfreeze-action' of github.com:actu…
MatissJanis 68d9eb2
Refactor Merge Freeze workflow to simplify PR unblocking process
MatissJanis 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # When the "unfreeze" label is added to a PR, add that PR to Merge Freeze's unblocked list | ||
| # so it can be merged during a freeze. Requires MERGEFREEZE_ACCESS_TOKEN repo secret | ||
| # (project-specific token from Merge Freeze Web API panel for actualbudget/actual / master). | ||
| # See: https://docs.mergefreeze.com/web-api#post-freeze-status | ||
|
|
||
| name: Merge Freeze – add PR to unblocked list | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [labeled] | ||
|
|
||
| jobs: | ||
| unfreeze: | ||
| if: ${{ github.event.label.name == 'unfreeze' }} | ||
| runs-on: ubuntu-latest | ||
| concurrency: | ||
| group: merge-freeze-unfreeze-${{ github.ref }}-labels | ||
| cancel-in-progress: false | ||
| steps: | ||
| - name: POST to Merge Freeze – add PR to unblocked list | ||
| env: | ||
| MERGEFREEZE_ACCESS_TOKEN: ${{ secrets.MERGEFREEZE_ACCESS_TOKEN }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| USER_NAME: ${{ github.actor }} | ||
| run: | | ||
| set -e | ||
| if [ -z "$MERGEFREEZE_ACCESS_TOKEN" ]; then | ||
| echo "::error::MERGEFREEZE_ACCESS_TOKEN secret is not set" | ||
| exit 1 | ||
| fi | ||
| url="https://www.mergefreeze.com/api/branches/actualbudget/actual/master/?access_token=${MERGEFREEZE_ACCESS_TOKEN}" | ||
| payload=$(jq -n --arg user_name "$USER_NAME" --argjson pr "$PR_NUMBER" '{frozen: true, user_name: $user_name, unblocked_prs: [$pr]}') | ||
| curl -sf -X POST "$url" -H "Content-Type: application/json" -d "$payload" | ||
| echo "Merge Freeze updated: PR #$PR_NUMBER added to unblocked list." | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| category: Maintenance | ||
| authors: [MatissJanis] | ||
| --- | ||
|
|
||
| Add 'unfreeze' label that can be used to unfreeze PRs during mergefreeze |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.