Skip to content

Commit c911905

Browse files
fix: fixing syntax error
1 parent 032b519 commit c911905

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/auto-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
open-pull-request:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: checkout
12+
- name: Checkout
1313
uses: actions/checkout@v4
1414

15-
- name: get issue number
15+
- name: Get issue number
1616
id: get_issue_number
1717
run: |
1818
if [[ ${{ github.ref_name }} =~ puzzle/([0-9]{4})-day-([1-9]|1[0-9]|2[0-5]) ]]; then
@@ -33,7 +33,7 @@ jobs:
3333
fi
3434
env:
3535
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
36-
- name: create pull request
36+
- name: Create pull request
3737
run: |
3838
gh pr create -B main -H ${{ github.ref_name }} -t "Pull request to resolve #${{ steps.get_issue_number.outputs.issue_number }}" -b ""
3939
env:

.github/workflows/check-resolution.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- opened
99

1010
jobs:
11-
submit-answer:
11+
get-answer:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
@@ -22,7 +22,7 @@ jobs:
2222
- name: Extract year and day from branch name
2323
id: extract
2424
run: |
25-
branch_name=$(echo ${{ github.event.pull_request.head.ref }})
25+
branch_name=$(echo "${{ github.event.pull_request.head.ref }}")
2626
2727
if [[ $branch_name =~ puzzle/([0-9]{4})-day-([1-9]|1[0-9]|2[0-5]) ]]; then
2828
year="${BASH_REMATCH[1]}"
@@ -33,6 +33,7 @@ jobs:
3333
else
3434
echo "Branch name does not follow the expected pattern."
3535
exit 1
36+
fi
3637
3738
- name: Get answer
3839
id: get_answer
@@ -50,6 +51,7 @@ jobs:
5051
else
5152
echo "Script not found: $script_path"
5253
exit 1
54+
fi
5355
5456
- name: Submit answer
5557
id: submit_answer

.github/workflows/update-issue.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,32 @@ jobs:
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
15+
1516
- name: Parsing issue
1617
id: issue-parser
1718
uses: stefanbuck/github-issue-parser@v3
1819
with:
1920
template-path: .github/ISSUE_TEMPLATE/puzzle.yml
21+
2022
- name: Adding milestone to issue
2123
uses: Julexar/[email protected]
2224
with:
2325
token: "${{ secrets.ACTION_TOKEN }}"
2426
milestone: "${{ steps.issue-parser.outputs.issueparser_puzzle-year }} Puzzles"
27+
2528
- name: Run bash script to extract day from issue title
2629
id: extract
2730
run: |
2831
title="${{ github.event.issue.title }}"
32+
2933
if [[ $title =~ Day\ ([0-9]+) ]]; then
3034
day=${BASH_REMATCH[1]}
3135
echo "day=${day}" >> $GITHUB_OUTPUT
3236
else
3337
echo "::error::Title does not match the expected pattern"
3438
exit 1
3539
fi
40+
3641
- name: Create comment
3742
uses: peter-evans/create-or-update-comment@v4
3843
with:

0 commit comments

Comments
 (0)