Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/pr-policy-gate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,17 @@ jobs:
&& inputs.enable-auto-merge
&& github.event.pull_request.user.login != 'app/dlrsp-actions'
&& github.event.pull_request.user.login != 'dlrsp-actions[bot]'
run: gh pr merge --auto --rebase "${{ github.event.pull_request.html_url }}"
run: |
set -euo pipefail
if ! out="$(gh pr merge --auto --rebase "${{ github.event.pull_request.html_url }}" 2>&1)"; then
if [[ "$out" == *"Auto merge is not allowed"* ]] || [[ "$out" == *"enablePullRequestAutoMerge"* ]]; then
echo "::warning::Auto-merge not enabled on this repository — skipping"
exit 0
fi
echo "$out"
exit 1
fi
echo "$out"
env:
GH_TOKEN: ${{ steps.dlrsp-token.outputs.token }}

Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/upgrade-dependency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,21 @@ jobs:
pattern: py*
merge-multiple: true

# Private/template repos may lack org App secrets; skip PR rather than fail schedule.
- name: Check App secrets available
id: app-secrets
shell: bash
run: |
set -euo pipefail
if [[ -z "${{ secrets.DLRSP_ACTIONS_APP_ID }}" || -z "${{ secrets.DLRSP_ACTIONS_PRIVATE_KEY }}" ]]; then
echo "::warning::App secrets unavailable in this repository — skipping Open Pull Request"
echo "available=false" >> "$GITHUB_OUTPUT"
else
echo "available=true" >> "$GITHUB_OUTPUT"
fi

- name: Create App installation token
if: steps.app-secrets.outputs.available == 'true'
id: dlrsp-token
uses: DLRSP/workflows/.github/actions/dlrsp-actions-token@main
with:
Expand All @@ -126,6 +140,7 @@ jobs:
permission-pull-requests: write

- name: Create Pull Request
if: steps.app-secrets.outputs.available == 'true'
id: cpr
uses: peter-evans/create-pull-request@v8
with:
Expand Down
Loading