File tree Expand file tree Collapse file tree 6 files changed +14
-147
lines changed Expand file tree Collapse file tree 6 files changed +14
-147
lines changed Original file line number Diff line number Diff line change 15
15
16
16
jobs :
17
17
find_exercise :
18
- name : Find exercise by issue title
19
- runs-on : ubuntu-latest
20
-
21
- outputs :
22
- issue-url : ${{ steps.get-issue-url-by-title.outputs.ISSUE_URL }}
23
-
24
- steps :
25
- - id : get-issue-url-by-title
26
- uses : actions/github-script@v7
27
- env :
28
- ISSUE_TITLE_PREFIX : " Exercise:"
29
- with :
30
- script : |
31
- const issues = await github.rest.issues.listForRepo({
32
- owner: context.repo.owner,
33
- repo: context.repo.repo,
34
- state: 'open',
35
- per_page: 1
36
- });
37
-
38
- const issue = issues.data.find(issue => issue.title.includes(process.env.ISSUE_TITLE_PREFIX ));
39
- if (!issue) {
40
- throw new Error('No exercise issue found');
41
- }
42
-
43
- core.setOutput('ISSUE_URL', issue.html_url);
18
+ name : Find Exercise Issue
19
+ uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.1.0
44
20
45
21
check_step_work :
46
22
name : Check step work
Original file line number Diff line number Diff line change 17
17
18
18
jobs :
19
19
find_exercise :
20
- name : Find exercise by issue title
21
- runs-on : ubuntu-latest
22
-
23
- outputs :
24
- issue-url : ${{ steps.get-issue-url-by-title.outputs.ISSUE_URL }}
25
-
26
- steps :
27
- - id : get-issue-url-by-title
28
- uses : actions/github-script@v7
29
- env :
30
- ISSUE_TITLE_PREFIX : " Exercise:"
31
- with :
32
- script : |
33
- const issues = await github.rest.issues.listForRepo({
34
- owner: context.repo.owner,
35
- repo: context.repo.repo,
36
- state: 'open',
37
- per_page: 1
38
- });
39
-
40
- const issue = issues.data.find(issue => issue.title.includes(process.env.ISSUE_TITLE_PREFIX ));
41
- if (!issue) {
42
- throw new Error('No exercise issue found');
43
- }
44
-
45
- core.setOutput('ISSUE_URL', issue.html_url);
20
+ name : Find Exercise Issue
21
+ uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.1.0
46
22
47
23
check_step_work :
48
24
name : Check step work
Original file line number Diff line number Diff line change 17
17
18
18
jobs :
19
19
find_exercise :
20
- name : Find exercise by issue title
21
- runs-on : ubuntu-latest
22
-
23
- outputs :
24
- issue-url : ${{ steps.get-issue-url-by-title.outputs.ISSUE_URL }}
25
-
26
- steps :
27
- - id : get-issue-url-by-title
28
- uses : actions/github-script@v7
29
- env :
30
- ISSUE_TITLE_PREFIX : " Exercise:"
31
- with :
32
- script : |
33
- const issues = await github.rest.issues.listForRepo({
34
- owner: context.repo.owner,
35
- repo: context.repo.repo,
36
- state: 'open',
37
- per_page: 1
38
- });
39
-
40
- const issue = issues.data.find(issue => issue.title.includes(process.env.ISSUE_TITLE_PREFIX ));
41
- if (!issue) {
42
- throw new Error('No exercise issue found');
43
- }
44
-
45
- core.setOutput('ISSUE_URL', issue.html_url);
20
+ name : Find Exercise Issue
21
+ uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.1.0
46
22
47
23
check_step_work :
48
24
name : Check step work
108
84
checks=$(echo $checks | jq '.styles_css.message = "Please use Copilot to update the web application styling to support participant info."')
109
85
fi
110
86
111
- # Verify all checks passed
87
+ # Verify all checks passed
112
88
passed=$(echo $checks | jq '. | all(.passed?)')
113
89
114
90
# Flatten to an array for returning. Allows iteration during rendering.
Original file line number Diff line number Diff line change 35
35
COMMENT_BODY : ${{ github.event.comment.body }}
36
36
37
37
find_exercise :
38
- name : Find exercise by issue title
39
- runs-on : ubuntu-latest
40
-
41
- outputs :
42
- issue-url : ${{ steps.get-issue-url.outputs.ISSUE_URL }}
43
-
44
- steps :
45
- - id : get-issue-url
46
- run : |
47
- # Get the issue url from the event or search for it.
48
- if [ -n "${{ github.event.issue }}" ]; then
49
- issue_url="${{ github.event.issue.html_url }}"
50
- else
51
- issue_url=$(gh issue list --repo $REPO --search "in:title Exercise:" --json url,title --jq '.[].url')
52
- fi
53
-
54
- # Save to output
55
- echo "ISSUE_URL=$issue_url" >> $GITHUB_OUTPUT
56
- env :
57
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58
- REPO : ${{ github.repository }}
38
+ name : Find Exercise Issue
39
+ uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.1.0
59
40
60
41
post_step_3b_content :
61
42
name : Post step 3b content
Original file line number Diff line number Diff line change 17
17
18
18
jobs :
19
19
find_exercise :
20
- if : |
21
- !github.event.repository.is_template
22
- name : Find exercise by issue title
23
- runs-on : ubuntu-latest
24
-
25
- outputs :
26
- issue-url : ${{ steps.get-issue-url.outputs.ISSUE_URL }}
27
-
28
- steps :
29
- - id : get-issue-url
30
- run : |
31
- # Get the issue url from the event or search for it.
32
- if [ -n "${{ github.event.issue }}" ]; then
33
- issue_url="${{ github.event.issue.html_url }}"
34
- else
35
- issue_url=$(gh issue list --repo $REPO --search "in:title Exercise:" --json url,title --jq '.[].url')
36
- fi
37
-
38
- # Save to output
39
- echo "ISSUE_URL=$issue_url" >> $GITHUB_OUTPUT
40
- env :
41
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42
- REPO : ${{ github.repository }}
20
+ name : Find Exercise Issue
21
+ uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.1.0
43
22
44
23
check_step_work :
45
24
name : Check step work
Original file line number Diff line number Diff line change @@ -20,29 +20,8 @@ permissions:
20
20
21
21
jobs :
22
22
find_exercise :
23
- if : |
24
- !github.event.repository.is_template
25
- name : Find exercise by issue title
26
- runs-on : ubuntu-latest
27
-
28
- outputs :
29
- issue-url : ${{ steps.get-issue-url.outputs.ISSUE_URL }}
30
-
31
- steps :
32
- - id : get-issue-url
33
- run : |
34
- # Get the issue url from the event or search for it.
35
- if [ -n "${{ github.event.issue }}" ]; then
36
- issue_url="${{ github.event.issue.html_url }}"
37
- else
38
- issue_url=$(gh issue list --repo $REPO --search "in:title Exercise:" --json url,title --jq '.[].url')
39
- fi
40
-
41
- # Save to output
42
- echo "ISSUE_URL=$issue_url" >> $GITHUB_OUTPUT
43
- env :
44
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
- REPO : ${{ github.repository }}
23
+ name : Find Exercise Issue
24
+ uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.1.0
46
25
47
26
check_step_work :
48
27
name : Check step work
100
79
checks=$(echo $checks | jq '.copilot_review.message = "Please request a review from Copilot."')
101
80
fi
102
81
103
- # Verify all checks passed
82
+ # Verify all checks passed
104
83
passed=$(echo $checks | jq '. | all(.passed?)')
105
84
106
85
# Flatten to an array for returning. Allows iteration during rendering.
You can’t perform that action at this time.
0 commit comments