Skip to content

Commit 3076117

Browse files
authored
Merge branch '312552057' into 312552057
2 parents 5aae7d6 + 033f080 commit 3076117

File tree

4 files changed

+54
-2
lines changed

4 files changed

+54
-2
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@
1515
- [ ] From your specific branch (***not main or other's branch***) merging to your branch
1616
- [ ] Excluding any irrelevant files, such as binaries, text files, or dot files
1717
- [ ] Passing tests/CI
18-
- [ ] Add proper label for this PR

.github/workflows/label.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Automatic PR Labeler
2+
on:
3+
pull_request_target:
4+
types: [opened, reopened, edited]
5+
6+
jobs:
7+
labeler:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Label PR
11+
uses: actions/github-script@v5
12+
with:
13+
github-token: ${{ secrets.PAT }}
14+
script: |
15+
const { owner, repo, number: issue_number } = context.issue;
16+
const pr = await github.rest.pulls.get({ owner, repo, pull_number: issue_number });
17+
const title = pr.data.title;
18+
const labRegex = /\[LAB(\d+)\]/i;
19+
20+
const match = title.match(labRegex);
21+
if (match) {
22+
const labelToAdd = 'lab' + match[1];
23+
await github.rest.issues.addLabels({ owner, repo, issue_number, labels: [labelToAdd] });
24+
}

lab1/validate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cd $tmp_dir
99

1010
rm -rf *
1111
cp $solution_path/*.js .
12-
result=$($node --test --experimental-test-coverage) ; ret=$?
12+
result=$($"node" --test --experimental-test-coverage) ; ret=$?
1313
if [ $ret -ne 0 ] ; then
1414
echo "[!] testing fails"
1515
exit 1

scripts/rebase-all.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
git fetch origin
4+
5+
for branch in $(git branch -r | grep -v HEAD); do
6+
# Remove the "origin/" prefix
7+
branch=${branch#origin/}
8+
9+
if [[ "$branch" != "main" ]]; then
10+
git checkout "$branch"
11+
if [[ $? -ne 0 ]]; then
12+
echo "Checkout failed for branch $branch"
13+
exit 1
14+
fi
15+
git pull origin "$branch"
16+
if [[ $? -ne 0 ]]; then
17+
echo "Pull failed for branch $branch"
18+
exit 1
19+
fi
20+
git rebase main
21+
if [[ $? -ne 0 ]]; then
22+
echo "Rebase failed for branch $branch"
23+
exit 1
24+
fi
25+
git push origin "$branch"
26+
fi
27+
done
28+
29+
git checkout main

0 commit comments

Comments
 (0)