Skip to content

Commit 073a33d

Browse files
authored
Update lab-autograding.yml
1 parent b1047d3 commit 073a33d

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

.github/workflows/lab-autograding.yml

-20
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@ jobs:
1212
os: [ubuntu-22.04]
1313
fail-fast: false
1414
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v4
17-
with:
18-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
19-
fetch-depth: 1
20-
21-
- name: Set up Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version: '20'
25-
26-
2715
- uses: actions/checkout@v4
2816
with:
2917
ref: "${{ github.event.pull_request.merge_commit_sha }}"
@@ -52,20 +40,12 @@ jobs:
5240
return { number: 0 };
5341
}
5442
const labNumber = labNumberMatch[1];
55-
console.log(`Lab number: ${labNumber}`);
56-
5743
console.log(`Lab number: ${labNumber}`)
5844
5945
const files = await github.rest.pulls.listFiles({ owner, repo, pull_number: issue_number });
6046
const changedFiles = files.data.map((file) => file.filename);
6147
const allowedFileRegex = /^lab\d+\/main_test.js$/;
6248
const specialChangedFiles = ["lab5/Answer.md", "lab5/antiasan.c", "lab6/Answer.md", "lab7/sol.py"];
63-
if (!changedFiles.every((file) => allowedFileRegex.test(file) || specialChangedFiles.includes(file))) {
64-
core.setFailed('The PR contains changes to files other than the allowed files.');
65-
}
66-
return labNumber;
67-
68-
6949
if (!changedFiles.every((file) => (allowedFileRegex.test(file) || specialChangedFiles.includes(file)))) {
7050
core.setFailed('The PR contains changes to files other than the allowed files.');
7151
}

0 commit comments

Comments
 (0)