Skip to content

Commit

Permalink
Merge pull request #2324 from mbeddr/feature/automerge-workflow
Browse files Browse the repository at this point in the history
Restrict automerge workflow to MPS branches only, ignore old MPS versions
  • Loading branch information
sergej-koscejev authored Nov 11, 2023
2 parents e9a4c89 + dec03de commit c1812b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/PR-into-next-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: PR to merge into the next version
on:
push:
branches:
- 'maintenance/*'
- 'maintenance/mps*'

jobs:
create-pr:
Expand All @@ -17,8 +17,8 @@ jobs:
echo "Calculating PR branches:"
# Next branch matching refs/heads/maintenance/* pattern, or empty if we're on the last one
next_maintenance_branch=$(gh api "/repos/$owner_and_repo/git/matching-refs/heads/maintenance/" \
--jq 'map(.ref | ltrimstr("refs/heads/") | select(. > "${{ github.ref_name }}")) | sort | min')
next_maintenance_branch=$(gh api "/repos/$owner_and_repo/git/matching-refs/heads/maintenance/mps" \
--jq 'map(.ref | ltrimstr("refs/heads/") | select(. > "${{ github.ref_name }}" and . < "maintenance/mps3")) | min')
echo " Next maintenance branch: ${next_maintenance_branch:-(none)}"
# Substitute the default branch if empty
Expand Down

0 comments on commit c1812b1

Please sign in to comment.