aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-11-17 20:05:12 +0000
committerGitHub <noreply@github.com>2021-11-17 20:05:12 +0000
commitb06740c933c63a8f82e0a7112f9eeab9bd93687a (patch)
treebdb89bed4a77e56d2ee6f3f035ff52d777ceb3a4
parent3d49069a46b42d2a0e4d8b7537ac4ccf41e6402d (diff)
downloadqmk_firmware-b06740c933c63a8f82e0a7112f9eeab9bd93687a.tar.gz
qmk_firmware-b06740c933c63a8f82e0a7112f9eeab9bd93687a.zip
Auto-create PRs for merged formatting issues (#15157)
* Auto-create PRs for merged formatting issues * Update .github/workflows/format_push.yaml
-rw-r--r--.github/workflows/format_push.yaml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/format_push.yaml b/.github/workflows/format_push.yaml
new file mode 100644
index 000000000..8b579bf86
--- /dev/null
+++ b/.github/workflows/format_push.yaml
@@ -0,0 +1,49 @@
1name: Lint Format
2
3on:
4 push:
5 branches:
6 - master
7 - develop
8
9jobs:
10 lint:
11 runs-on: ubuntu-latest
12
13 container: qmkfm/qmk_cli
14
15 steps:
16 - name: Install dependencies
17 run: |
18 apt-get update && apt-get install -y dos2unix
19
20 - uses: actions/checkout@v2
21 with:
22 fetch-depth: 0
23
24 - name: Run qmk formatters
25 shell: 'bash {0}'
26 run: |
27 qmk format-c -a
28 qmk format-python
29 qmk format-text -a
30 git diff
31
32 - uses: rlespinasse/github-slug-action@v3.x
33
34 - name: Become QMK Bot
35 run: |
36 git config user.name 'QMK Bot'
37 git config user.email 'hello@qmk.fm'
38
39 - name: Create Pull Request
40 uses: peter-evans/create-pull-request@v3
41 if: ${{ github.repository == 'qmk/qmk_firmware'}}
42 with:
43 token: ${{ secrets.QMK_BOT_TOKEN }}
44 delete-branch: true
45 branch: bugfix/format_${{ env.GITHUB_REF_SLUG }}
46 author: QMK Bot <hello@qmk.fm>
47 committer: QMK Bot <hello@qmk.fm>
48 commit-message: Format code according to conventions
49 title: '[CI] Format code according to conventions'