From 7dbbd5d8b1831ae190fe29cc6630b08cbc90c568 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 9 Aug 2021 15:21:50 +0200 Subject: 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. --- .github/workflows/squash-typos.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/squash-typos.yml (limited to '.github/workflows') diff --git a/.github/workflows/squash-typos.yml b/.github/workflows/squash-typos.yml new file mode 100644 index 0000000000..6f5e24a9b6 --- /dev/null +++ b/.github/workflows/squash-typos.yml @@ -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 -- cgit