* constrain auto-close and enforce-dependency-review triggers we don't need to run these on PR close or when we apply labels, for example * skip workflows on push to dependabot branch * use PAT if available else fall back to workflow token * further constrain pull_request triggers Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
23 lines
465 B
YAML
23 lines
465 B
YAML
name: Auto close
|
|
on:
|
|
pull_request_target:
|
|
types: [opened]
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
auto-close:
|
|
runs-on: ubuntu-latest
|
|
if: github.actor == 'dependabot[bot]'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install action dependencies
|
|
run: cd .github/actions/close-bot && npm ci
|
|
|
|
- uses: ./.github/actions/close-bot
|
|
with:
|
|
github-token: '${{ secrets.GITHUB_TOKEN }}'
|