-
Notifications
You must be signed in to change notification settings - Fork 20
39 lines (39 loc) · 1.45 KB
/
automation-autosquash.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: autosquash
on:
pull_request:
types:
# omit "opened" as labeling happens after opening
# and when we include both the two events end up
# canceling each other's runs.
- reopened
- edited
- labeled
- synchronize
- unlabeled
- ready_for_review
concurrency:
# only one autosquash at a time per PR
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
autosquash:
runs-on: ubuntu-latest
steps:
- name: Get Token
if: github.event.pull_request.head.repo.full_name == 'theoremlp/rules_uv'
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.THM_AUTOMATION_APP_ID }}
private-key: ${{ secrets.THM_AUTOMATION_PRIVATE_KEY }}
- if: github.event.pull_request.head.repo.full_name == 'theoremlp/rules_uv'
uses: actions/checkout@v4
- if: github.event.pull_request.head.repo.full_name == 'theoremlp/rules_uv'
uses: theoremlp/autosquash@v1
with:
github-token: ${{ steps.app-token.outputs.token }}
pull-request-number: ${{ github.event.pull_request.number }}
squash-commit-title: "${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number }})"
squash-commit-message: "${{ github.event.pull_request.body }}"
do-not-merge-label: "do not merge"
required-label: "automerge"