Skip to content

Add searchable webhook ingress and dead-letter delivery API #162

Add searchable webhook ingress and dead-letter delivery API

Add searchable webhook ingress and dead-letter delivery API #162

Workflow file for this run

name: Auto-merge

Check warning on line 1 in .github/workflows/auto-merge.yml

View workflow run for this annotation

GitHub Actions / Auto-merge

Workflow execution policy warning (evaluate mode)

On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
enable:
name: Enable auto-merge
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
pull-requests: write
steps:
# This workflow intentionally does not check out or execute PR code.
- name: Check whether the author has write access
id: author-permission
env:
GH_TOKEN: ${{ github.token }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
run: |
can_push=$(gh api \
"repos/$GITHUB_REPOSITORY/collaborators/$PR_AUTHOR/permission" \
--jq '.user.permissions.push')
echo "can-push=$can_push" >> "$GITHUB_OUTPUT"
if [ "$can_push" != "true" ]; then
echo "Skipping pull request: $PR_AUTHOR does not have write access."
fi
- name: Merge after required checks pass
if: >-
github.event.pull_request.draft == false &&
steps.author-permission.outputs.can-push == 'true'
env:
GH_TOKEN: ${{ github.token }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr merge --auto --merge "$PR_URL"