neovim/.github/workflows/squash-typos.yml
dundargoc ce172d8d4a
ci: fix typo squasher by changing trigger to "pull_request_target" (#15357)
The "pull_request" trigger only enables read-access for forks,
"pull_request_target" is required if a fork is to be a trigger. Also
changed the python script to reflect this change.
2021-08-13 15:18:15 +02:00

34 lines
712 B
YAML

name: Squash Typo Pull Requests
on:
pull_request_target:
types: labeled
concurrency:
group: ${{ github.workflow }}
jobs:
build:
if: github.event.label.name == 'typo'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- name: Setup git config
run: |
git config --global user.name 'marvim'
git config --global user.email 'marvim@users.noreply.github.com'
- run: python scripts/squash_typos.py
env:
PR_NUMBER: ${{ github.event.number }}