Skip to content

Commit 5d0833a

Browse files
authored
chore(ci): remove pull_request_target (#87)
Similar to googleapis/langchain-google-alloydb-pg-python#189
1 parent 33337f7 commit 5d0833a

1 file changed

Lines changed: 0 additions & 29 deletions

File tree

.github/workflows/lint.yml

Lines changed: 0 additions & 29 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,33 +28,10 @@ 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@v3
60-
with:
61-
ref: ${{ github.event.pull_request.head.sha }}
62-
repository: ${{ github.event.pull_request.head.repo.full_name }}
63-
token: ${{ secrets.GITHUB_TOKEN }}
6435

6536
- name: Setup Python
6637
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0

0 commit comments

Comments
 (0)