Skip to content

Commit eefa48b

Browse files
ci: remove pull_request_target trigger (#378)
1 parent 67bff82 commit eefa48b

File tree

6 files changed

+145
-260
lines changed

6 files changed

+145
-260
lines changed

.github/labels.yml

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,74 +16,72 @@
1616
color: ededed
1717
description: ""
1818

19-
- name: 'type: bug'
19+
- name: "type: bug"
2020
color: db4437
21-
description: Error or flaw in code with unintended results or allowing sub-optimal
21+
description:
22+
Error or flaw in code with unintended results or allowing sub-optimal
2223
usage patterns.
23-
- name: 'type: cleanup'
24+
- name: "type: cleanup"
2425
color: c5def5
2526
description: An internal cleanup or hygiene concern.
26-
- name: 'type: docs'
27+
- name: "type: docs"
2728
color: 0000A0
2829
description: Improvement to the documentation for an API.
29-
- name: 'type: feature request'
30+
- name: "type: feature request"
3031
color: c5def5
3132
description: ‘Nice-to-have’ improvement, new feature or different behavior or design.
32-
- name: 'type: process'
33+
- name: "type: process"
3334
color: c5def5
3435
description: A process-related concern. May include testing, release, or the like.
35-
- name: 'type: question'
36+
- name: "type: question"
3637
color: c5def5
3738
description: Request for information or clarification.
3839

39-
- name: 'priority: p0'
40+
- name: "priority: p0"
4041
color: b60205
4142
description: Highest priority. Critical issue. P0 implies highest priority.
42-
- name: 'priority: p1'
43+
- name: "priority: p1"
4344
color: ffa03e
44-
description: Important issue which blocks shipping the next release. Will be fixed
45+
description:
46+
Important issue which blocks shipping the next release. Will be fixed
4547
prior to next release.
46-
- name: 'priority: p2'
48+
- name: "priority: p2"
4749
color: fef2c0
4850
description: Moderately-important priority. Fix may not be included in next release.
49-
- name: 'priority: p3'
51+
- name: "priority: p3"
5052
color: ffffc7
5153
description: Desirable enhancement or fix. May not be included in next release.
5254

5355
- name: automerge
5456
color: 00ff00
5557
description: Merge the pull request once unit tests and other checks pass.
56-
- name: 'automerge: exact'
58+
- name: "automerge: exact"
5759
color: 8dd517
58-
description: Summon MOG for automerging, but approvals need to be against the latest
60+
description:
61+
Summon MOG for automerging, but approvals need to be against the latest
5962
commit
6063
- name: do not merge
6164
color: d93f0b
62-
description: Indicates a pull request not ready for merge, due to either quality
63-
or timing.
65+
description: Indicates a pull request not ready for merge, due to either quality or timing.
6466

65-
- name: 'autorelease: pending'
67+
- name: "autorelease: pending"
6668
color: ededed
6769
description: Release please needs to do its work on this.
68-
- name: 'autorelease: tagged'
70+
- name: "autorelease: tagged"
6971
color: ededed
7072
description: Release please has completed a release for this.
71-
- name: 'autorelease: triggered'
73+
- name: "autorelease: triggered"
7274
color: ededed
7375
description: Release please has triggered a release for this.
7476

75-
- name: 'tests: run'
76-
color: 3DED97
77-
description: Label to trigger Github Action tests.
78-
79-
- name: 'flakybot: flaky'
77+
- name: "flakybot: flaky"
8078
color: 86d9d7
8179
description: Tells the Flaky Bot not to close or comment on this issue.
8280

83-
- name: 'flakybot: quiet'
81+
- name: "flakybot: quiet"
8482
color: 86d9d7
8583
description: Tells the Flaky Bot to comment less.
8684

87-
- name: 'flakybot: issue'
85+
- name: "flakybot: issue"
8886
color: a9f9f7
8987
description: An issue filed by the Flaky Bot. Should not be added manually.

.github/trusted-contribution.yml

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

.github/workflows/codeql.yml

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,18 @@ name: "CodeQL"
1616

1717
on:
1818
push:
19-
branches: [ "main" ]
19+
branches: ["main"]
2020
pull_request:
21-
branches: [ "main" ]
21+
branches: ["main"]
2222
paths-ignore:
23-
- '**/*.md'
24-
- '**/*.txt'
25-
pull_request_target:
26-
types: [labeled]
27-
paths-ignore:
28-
- '**/*.md'
29-
- '**/*.txt'
23+
- "**/*.md"
24+
- "**/*.txt"
3025

3126
# Declare default permissions as read only.
3227
permissions: read-all
3328

3429
jobs:
3530
analyze:
36-
if: "${{ github.event.action != 'labeled' || github.event.label.name == 'tests: run' }}"
3731
name: Analyze
3832
runs-on: ubuntu-latest
3933
permissions:
@@ -44,27 +38,24 @@ jobs:
4438
strategy:
4539
fail-fast: false
4640
matrix:
47-
language: [ 'javascript' ]
41+
language: ["javascript"]
4842

4943
steps:
50-
- name: Checkout repository
51-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
52-
with:
53-
ref: ${{ github.event.pull_request.head.sha }}
54-
repository: ${{ github.event.pull_request.head.repo.full_name }}
55-
56-
# Initializes the CodeQL tools for scanning.
57-
- name: Initialize CodeQL
58-
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
59-
with:
60-
languages: ${{ matrix.language }}
61-
62-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
63-
# If this step fails, then you should remove it and run the build manually
64-
- name: Autobuild
65-
uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
66-
67-
- name: Perform CodeQL Analysis
68-
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
69-
with:
70-
category: "/language:${{matrix.language}}"
44+
- name: Checkout repository
45+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
46+
47+
# Initializes the CodeQL tools for scanning.
48+
- name: Initialize CodeQL
49+
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
50+
with:
51+
languages: ${{ matrix.language }}
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
54+
# If this step fails, then you should remove it and run the build manually
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
57+
58+
- name: Perform CodeQL Analysis
59+
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
60+
with:
61+
category: "/language:${{matrix.language}}"

.github/workflows/coverage.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,14 @@
1515
name: Code Coverage
1616
on:
1717
pull_request:
18-
pull_request_target:
19-
types: [labeled]
2018

2119
# Declare default permissions as read only.
2220
permissions: read-all
2321

2422
jobs:
2523
coverage:
26-
if: "${{ github.event.action != 'labeled' || github.event.label.name == 'tests: run' }}"
2724
runs-on: ubuntu-latest
28-
permissions:
29-
issues: write
30-
pull-requests: write
3125
steps:
32-
- name: Remove PR Label
33-
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
34-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
35-
with:
36-
github-token: ${{ secrets.GITHUB_TOKEN }}
37-
script: |
38-
try {
39-
await github.rest.issues.removeLabel({
40-
name: 'tests: run',
41-
owner: context.repo.owner,
42-
repo: context.repo.repo,
43-
issue_number: context.payload.pull_request.number
44-
});
45-
} catch (e) {
46-
console.log('Failed to remove label. Another job may have already removed it!');
47-
}
48-
4926
- name: Checkout base branch
5027
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5128
with:

.github/workflows/lint.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,17 @@ name: Lint
1616

1717
on:
1818
pull_request:
19-
pull_request_target:
20-
types: [labeled]
2119

2220
# Declare default permissions as read only.
2321
permissions: read-all
2422

2523
jobs:
2624
lint:
27-
# 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)
28-
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' }}"
2925
name: Lint
3026
runs-on: ubuntu-latest
3127
steps:
3228
- name: Checkout code
3329
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
34-
with:
35-
ref: ${{ github.event.pull_request.head.sha }}
36-
repository: ${{ github.event.pull_request.head.repo.full_name }}
3730

3831
- name: Use Nodejs v18.x
3932
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
@@ -45,5 +38,3 @@ jobs:
4538

4639
- name: Run Lint
4740
run: npm run lint
48-
49-

0 commit comments

Comments
 (0)