Skip to content

Commit 0f5e167

Browse files
separate out linked file check (#25573)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 2b564e8 commit 0f5e167

File tree

3 files changed

+32
-15
lines changed

3 files changed

+32
-15
lines changed

.github/actions/build-vsix/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ runs:
9393
VSIX_NAME: ${{ inputs.vsix_name }}
9494

9595
- name: Upload VSIX
96-
uses: actions/upload-artifact@v4
96+
uses: actions/upload-artifact@v5
9797
with:
9898
name: ${{ inputs.artifact_name }}
9999
path: ${{ inputs.vsix_name }}

.github/workflows/pr-file-check.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,3 @@ jobs:
4242
.github/test_plan.md
4343
skip-label: 'skip tests'
4444
failure-message: 'TypeScript code was edited without also editing a ${file-pattern} file; see the Testing page in our wiki on testing guidelines (the ${skip-label} label can be used to pass this check)'
45-
46-
- name: 'Ensure PR has an associated issue'
47-
uses: actions/github-script@v8
48-
with:
49-
script: |
50-
const labels = context.payload.pull_request.labels.map(label => label.name);
51-
if (!labels.includes('skip-issue-check')) {
52-
const prBody = context.payload.pull_request.body || '';
53-
const issueLink = prBody.match(/https:\/\/github\.com\/\S+\/issues\/\d+/);
54-
const issueReference = prBody.match(/#\d+/);
55-
if (!issueLink && !issueReference) {
56-
core.setFailed('No associated issue found in the PR description.');
57-
}
58-
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: PR issue check
2+
3+
on:
4+
pull_request:
5+
types:
6+
- 'opened'
7+
- 'reopened'
8+
- 'synchronize'
9+
- 'labeled'
10+
- 'unlabeled'
11+
12+
permissions: {}
13+
14+
jobs:
15+
check-for-attached-issue:
16+
name: 'Check for attached issue'
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: 'Ensure PR has an associated issue'
20+
uses: actions/github-script@v8
21+
with:
22+
script: |
23+
const labels = context.payload.pull_request.labels.map(label => label.name);
24+
if (!labels.includes('skip-issue-check')) {
25+
const prBody = context.payload.pull_request.body || '';
26+
const issueLink = prBody.match(/https:\/\/github\.com\/\S+\/issues\/\d+/);
27+
const issueReference = prBody.match(/#\d+/);
28+
if (!issueLink && !issueReference) {
29+
core.setFailed('No associated issue found in the PR description.');
30+
}
31+
}

0 commit comments

Comments
 (0)