ci: create GitHub Action that squashes all typo PRs into a single PR (#15041)

The action adds all pull-request authors (and Marvim) as a co-author to the
newly created PR and also links to the closed PRs.
This commit is contained in:
dundargoc
2021-08-09 15:21:50 +02:00
committed by GitHub
parent 9ef7003c38
commit 7dbbd5d8b1
2 changed files with 180 additions and 0 deletions

32
.github/workflows/squash-typos.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Squash Typo Pull Requests
on:
pull_request:
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
ref: master
- 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