Skip to content

Paginate runs on individual Job pages at 20 per page #128

Paginate runs on individual Job pages at 20 per page

Paginate runs on individual Job pages at 20 per page #128

Workflow file for this run

name: Auto-merge
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"