Skip to content

Commit b877754

Browse files
arilivigniCopilotchriswblake
authored
Update exercise (#58)
* feat: Implement new exercise workflow and remove deprecated welcome workflow - Added a new workflow for starting the exercise, including steps for posting comments and managing workflow states. - Removed the old welcome workflow that was previously used to transition from step 0 to step 1. - Updated existing workflows (steps 1 to 4) to improve structure and functionality, including checks for dependency versions and comments for user feedback. - Enhanced the README with updated instructions and links for starting the exercise. - Updated license information to reflect the current year and maintain consistency. - Added a .gitignore entry for temporary files used in testing. * fix: Correct variable names for occurrences in dependabot workflows * fix: Update badge link in README for correct exercise template * fix: Update badge link in README to correct template owner * fix: Update "Code security and analysis" to "Code Security" in documentation and workflows * fix: Update permissions and workflow versions in GitHub Actions * fix: Update workflows to use exercise-toolkit and improve template handling * fix: Remove unused steps from dependency graph workflows * fix: Add step finished message updates in Dependabot workflows * fix: Update step finished message templates in workflow files * fix: Update Dependabot steps and workflow templates for clarity and accuracy * fix: Improve error message for missing keyphrase in Dependabot file check * fix: Add conditional check for non-template repositories in post review content job * fix: Add disable workflows job to the start exercise workflow * fix: Add missing checkout step in post review content job * Add steps to disable all workflows * fix: update action-text-variables to version 2 in workflow files * Update .github/workflows/0-start-exercise.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove unnecessary footer about github status page. * fix: add copy exercise intro * forgot to copy the bold * Remove double introduction * Remove double introduction * Update .github/steps/x-review.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/workflows/0-start-exercise.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Replace message to refresh the page * cleanup * Replace message to refresh the page in step 2 * cleanup * Replace message to refresh the page in step 3 * Adjust confusing instructions * Replace message to refresh the page in step 4 * Update .github/steps/4-dependabot-versions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/steps/3-dependabot-security.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix change based on v2 action-text-variables * fix step numbers * fix: streamline condition for step execution in workflow files --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Christopher W. Blake <chriswblake@github.com>
1 parent 95ca5a2 commit b877754

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

.github/workflows/1-dependency-graph.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
name: Check step work
2727
runs-on: ubuntu-latest
2828
needs: find_exercise
29+
if: !github.event.repository.is_template
2930
env:
3031
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
3132

.github/workflows/2-dependabot-alerts.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ jobs:
2626
name: Check step work
2727
runs-on: ubuntu-latest
2828
needs: find_exercise
29-
if: |
30-
!github.event.repository.is_template
29+
if: !github.event.repository.is_template
3130
env:
3231
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
3332

.github/workflows/3-dependabot-security.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ jobs:
2626
name: Check step work
2727
runs-on: ubuntu-latest
2828
needs: find_exercise
29-
if: |
30-
!github.event.repository.is_template
29+
if: !github.event.repository.is_template
3130
env:
3231
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
3332

@@ -51,7 +50,7 @@ jobs:
5150
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5251

5352
# START: Check practical exercise
54-
53+
5554
# Verify the PR added the dependabot changes.
5655
- name: Check package.json and package-lock.json for axios version other than 0.21.1
5756
id: check-axios-version
@@ -141,15 +140,15 @@ jobs:
141140
repository: skills/exercise-toolkit
142141
path: exercise-toolkit
143142
ref: v0.3.0
144-
143+
145144
- name: Build comment - add step content
146145
id: build-comment
147146
uses: skills/action-text-variables@v2
148147
with:
149148
template-file: "${{ env.STEP_4_FILE }}"
150149
template-vars: |
151150
full_repo_name: "${{ github.repository }}"
152-
151+
153152
- name: Create comment - add step content
154153
run: |
155154
gh issue comment "$ISSUE_URL" \
@@ -170,4 +169,4 @@ jobs:
170169
gh workflow disable "Step 3"
171170
gh workflow enable "Step 4"
172171
env:
173-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/4-dependabot-versions.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ jobs:
2626
name: Check step work
2727
needs: find_exercise
2828
runs-on: ubuntu-latest
29-
if: |
30-
!github.event.repository.is_template
29+
if: !github.event.repository.is_template
3130
env:
3231
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
3332

@@ -76,8 +75,7 @@ jobs:
7675
name: Post review content
7776
needs: [find_exercise, check_step_work]
7877
runs-on: ubuntu-latest
79-
if: |
80-
!github.event.repository.is_template
78+
if: !github.event.repository.is_template
8179
env:
8280
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
8381

@@ -110,4 +108,4 @@ jobs:
110108
- name: Disable current workflow
111109
run: gh workflow disable "${{github.workflow}}"
112110
env:
113-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)