Skip to content

Commit 6c30305

Browse files
authored
ci: don't use pull_request_target (#3929)
1 parent ff7ff09 commit 6c30305

2 files changed

Lines changed: 35 additions & 81 deletions

File tree

.github/workflows/dev.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
name: Dev
1919

2020
on:
21-
pull_request: {}
21+
pull_request:
22+
types:
23+
- opened
24+
- edited
25+
- reopened
26+
- synchronize
27+
- ready_for_review
2228
push:
2329
branches-ignore:
2430
- 'dependabot/**'
@@ -36,15 +42,41 @@ defaults:
3642
shell: bash
3743

3844
jobs:
45+
check-pr:
46+
name: "check PR"
47+
if: github.event_name == 'pull_request'
48+
runs-on: ubuntu-slim
49+
steps:
50+
- uses: actions/checkout@v6
51+
with:
52+
fetch-depth: 1
53+
persist-credentials: false
54+
# Pings make it into the commit message where they annoy the user every
55+
# time the commit gets pushed somewhere
56+
- name: Check PR body for pings
57+
# Don't check this if it's dependabot - dependabot doesn't ping users
58+
# and it tends to include things that look like pings (but are
59+
# escaped)
60+
if: github.actor != 'dependabot[bot]'
61+
env:
62+
PR_BODY: ${{ github.event.pull_request.body }}
63+
run: |
64+
python .github/workflows/dev_pr/body_check.py "$PR_BODY"
65+
66+
- name: Check PR title for conventional commit format
67+
env:
68+
PR_TITLE: ${{ github.event.pull_request.title }}
69+
run: |
70+
python dev/adbc_dev/title_check.py $(pwd) "$PR_TITLE"
71+
3972
pre-commit:
4073
name: "pre-commit"
4174
runs-on: ubuntu-latest
4275
steps:
4376
- uses: actions/checkout@v6
4477
with:
45-
fetch-depth: 0
78+
fetch-depth: 1
4679
persist-credentials: false
47-
4880
- name: Get required Go version
4981
run: |
5082
(. .env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV

.github/workflows/dev_pr.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)