Skip to content

development base branch for test #3

development base branch for test

development base branch for test #3

Workflow file for this run

# Opens a PR from fix/DX-6188-test → development after changes land on fix/DX-6188-test (back-merge).
#
# Org/repo Settings → Actions → General → Workflow permissions: read and write
# (so GITHUB_TOKEN can create pull requests). Or use a PAT in secret GH_TOKEN.
name: Back-merge fix/DX-6188-test to development
on:
push:
branches: [fix/DX-6188-test]
workflow_dispatch:
permissions:
contents: read
pull-requests: write
jobs:
open-back-merge-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Open back-merge PR if needed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
git fetch origin development fix/DX-6188-test
MASTER_SHA=$(git rev-parse origin/fix/DX-6188-test)
DEV_SHA=$(git rev-parse origin/development)
if [ "$MASTER_SHA" = "$DEV_SHA" ]; then
echo "fix/DX-6188-test and development are at the same commit; nothing to back-merge."
exit 0
fi
EXISTING=$(gh pr list --repo "${{ github.repository }}" \
--base development \
--head fix/DX-6188-test \
--state open \
--json number \
--jq 'length')
if [ "$EXISTING" -gt 0 ]; then
echo "An open PR from fix/DX-6188-test to development already exists; skipping."
exit 0
fi
gh pr create --repo "${{ github.repository }}" \
--base development \
--head fix/DX-6188-test \
--title "chore: back-merge fix/DX-6188-test into development" \
--body "Automated back-merge after changes landed on \`fix/DX-6188-test\`. Review and merge to keep \`development\` in sync."
echo "Created back-merge PR fix/DX-6188-test → development."