Skip to content

Commit 0c4e9b9

Browse files
authored
chore(ci): remove pull_request_target (#66)
Similar to googleapis/langchain-google-alloydb-pg-python#189
1 parent acb11a5 commit 0c4e9b9

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

.github/workflows/lint.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ on:
1919
- "*.md"
2020
- ".kokoro/**"
2121
- ".github/**"
22-
pull_request_target:
23-
types: [labeled]
24-
paths-ignore:
25-
- "*.md"
26-
- ".kokoro/**"
27-
- ".github/**"
2822

2923
jobs:
3024
lint:
@@ -34,27 +28,8 @@ jobs:
3428
concurrency:
3529
group: ${{ github.workflow }}-${{ github.ref }}
3630
cancel-in-progress: true
37-
# run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
38-
if: "${{ (github.event.action != 'labeled' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) || github.event.label.name == 'tests: run' }}"
3931

4032
steps:
41-
- name: Remove PR label
42-
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
43-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
44-
with:
45-
github-token: ${{ secrets.GITHUB_TOKEN }}
46-
script: |
47-
try {
48-
await github.rest.issues.removeLabel({
49-
name: 'tests: run',
50-
owner: context.repo.owner,
51-
repo: context.repo.repo,
52-
issue_number: context.payload.pull_request.number
53-
});
54-
} catch (e) {
55-
console.log('Failed to remove label. Another job may have already removed it!');
56-
}
57-
5833
- name: Checkout Repository
5934
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
6035
with:

0 commit comments

Comments
 (0)