From 3a4963c33bef65033de465185991bdccbeefc557 Mon Sep 17 00:00:00 2001
From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com>
Date: Fri, 4 Apr 2025 10:46:37 +0000
Subject: [PATCH 1/6] feat: update start-exercise workflow to generate README
from template
---
.github/workflows/start-exercise.yml | 45 ++++++++-----------
markdown-templates/readme/exercise-started.md | 19 ++++++++
2 files changed, 37 insertions(+), 27 deletions(-)
create mode 100644 markdown-templates/readme/exercise-started.md
diff --git a/.github/workflows/start-exercise.yml b/.github/workflows/start-exercise.yml
index f1efe66..a89f61b 100644
--- a/.github/workflows/start-exercise.yml
+++ b/.github/workflows/start-exercise.yml
@@ -102,35 +102,26 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Deactivate 'Copy Exercise' button
- run: |
- # Remove href from 'Copy Exercise' button
- target='id="copy-exercise"[^>]*href="[^"]*"'
- replacement='id="copy-exercise"'
- sed -i "s|$target|$replacement|g" README.md
-
- # Change color from green to gray
- target=Copy_Exercise-008000
- replacement=Copy_Exercise-AAA
- sed -i "s|$target|$replacement|g" README.md
-
- - name: Activate 'Start Exercise' button
- run: |
- # Add link to issue
- target='id="start-exercise"'
- replacement='id="start-exercise" href="../../issues/${{ needs.create_exercise.outputs.issue-number }}"'
- sed -i "s|$target|$replacement|g" README.md
+ - name: Get response templates
+ uses: actions/checkout@v4
+ with:
+ repository: skills/exercise-toolkit
+ path: exercise-toolkit
+ ref: start-exercise-updates
- # Change color from gray to green
- target=Start_Exercise-AAA
- replacement=Start_Exercise-008000
- sed -i "s|$target|$replacement|g" README.md
+ - name: Build welcome message from template
+ id: build-new-readme
+ uses: skills/action-text-variables@v1
+ with:
+ template-file: exercise-toolkit/markdown-templates/readme/exercise-started.md
+ template-vars: |
+ title=${{ inputs.exercise-title }}
+ login=${{ github.actor }}
- - name: Replace relative links
- run: |
- target=../../
- replacement=https://github.com/${{ github.repository }}/
- sed -i "s|$target|$replacement|g" README.md
+ - name: Overwrite README
+ env:
+ README_TEXT: ${{ steps.build-new-readme.outputs.updated-text }}
+ run: echo "$README_TEXT" > README.md
- name: Commit changes
uses: EndBug/add-and-commit@v9
diff --git a/markdown-templates/readme/exercise-started.md b/markdown-templates/readme/exercise-started.md
new file mode 100644
index 0000000..851a9fd
--- /dev/null
+++ b/markdown-templates/readme/exercise-started.md
@@ -0,0 +1,19 @@
+# The exercise is ready for you 🧑🎓 :memo:
+
+
+
+Hey **{{ login }}**!
+
+This is your personal copy of the **{{ title }}** exercise.
+
+**Ready to get started?**
+
+[](google.com)
+
+_You can come back to the exercise at any point in time if you decide to do it in parts!_
+
+---
+
+Get help: [Post in our discussion board](https://github.com/orgs/skills/discussions/categories/getting-started-with-github-copilot) • [Review the GitHub status page](https://www.githubstatus.com/)
+
+© 2025 GitHub • [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md) • [MIT License](https://gh.io/mit)
From 704cd208fd56bf66de9eb94749de3bb28ad7c6c7 Mon Sep 17 00:00:00 2001
From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com>
Date: Fri, 4 Apr 2025 10:56:06 +0000
Subject: [PATCH 2/6] fix: update help links in exercise-started README
template to be more generic
---
markdown-templates/readme/exercise-started.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/markdown-templates/readme/exercise-started.md b/markdown-templates/readme/exercise-started.md
index 851a9fd..6151b90 100644
--- a/markdown-templates/readme/exercise-started.md
+++ b/markdown-templates/readme/exercise-started.md
@@ -14,6 +14,6 @@ _You can come back to the exercise at any point in time if you decide to do it i
---
-Get help: [Post in our discussion board](https://github.com/orgs/skills/discussions/categories/getting-started-with-github-copilot) • [Review the GitHub status page](https://www.githubstatus.com/)
+Get help: [Post in our discussion board](https://github.com/orgs/skills/discussions/categories/) • [Review the GitHub status page](https://www.githubstatus.com/)
© 2025 GitHub • [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md) • [MIT License](https://gh.io/mit)
From b0936d3e0f1735556dabf2459b0946c2b17ec2ba Mon Sep 17 00:00:00 2001
From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com>
Date: Fri, 4 Apr 2025 11:10:00 +0000
Subject: [PATCH 3/6] feat: add dynamic link to exercise in README template
---
.github/workflows/start-exercise.yml | 1 +
markdown-templates/readme/exercise-started.md | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/start-exercise.yml b/.github/workflows/start-exercise.yml
index a89f61b..851d70a 100644
--- a/.github/workflows/start-exercise.yml
+++ b/.github/workflows/start-exercise.yml
@@ -117,6 +117,7 @@ jobs:
template-vars: |
title=${{ inputs.exercise-title }}
login=${{ github.actor }}
+ link_to_exercise=${{ needs.create_exercise.outputs.issue-url }}
- name: Overwrite README
env:
diff --git a/markdown-templates/readme/exercise-started.md b/markdown-templates/readme/exercise-started.md
index 6151b90..dcbe966 100644
--- a/markdown-templates/readme/exercise-started.md
+++ b/markdown-templates/readme/exercise-started.md
@@ -8,7 +8,7 @@ This is your personal copy of the **{{ title }}** exercise.
**Ready to get started?**
-[](google.com)
+[]({{{ link_to_exercise }}})
_You can come back to the exercise at any point in time if you decide to do it in parts!_
From ed387691c8e34a41f9789097a7107838ead1be81 Mon Sep 17 00:00:00 2001
From: "Christopher W. Blake"
Date: Fri, 4 Apr 2025 12:05:44 -0500
Subject: [PATCH 4/6] Use clearer variable name
---
.github/workflows/start-exercise.yml | 2 +-
markdown-templates/readme/exercise-started.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/start-exercise.yml b/.github/workflows/start-exercise.yml
index 851d70a..b6217b0 100644
--- a/.github/workflows/start-exercise.yml
+++ b/.github/workflows/start-exercise.yml
@@ -117,7 +117,7 @@ jobs:
template-vars: |
title=${{ inputs.exercise-title }}
login=${{ github.actor }}
- link_to_exercise=${{ needs.create_exercise.outputs.issue-url }}
+ issue_url=${{ needs.create_exercise.outputs.issue-url }}
- name: Overwrite README
env:
diff --git a/markdown-templates/readme/exercise-started.md b/markdown-templates/readme/exercise-started.md
index dcbe966..98d61dd 100644
--- a/markdown-templates/readme/exercise-started.md
+++ b/markdown-templates/readme/exercise-started.md
@@ -8,7 +8,7 @@ This is your personal copy of the **{{ title }}** exercise.
**Ready to get started?**
-[]({{{ link_to_exercise }}})
+[]({{{ issue_url }}})
_You can come back to the exercise at any point in time if you decide to do it in parts!_
From 1da92dbede9159e53d7d6be8d2cf291c89bdd319 Mon Sep 17 00:00:00 2001
From: "Christopher W. Blake"
Date: Fri, 4 Apr 2025 12:06:31 -0500
Subject: [PATCH 5/6] Simplify start message
---
markdown-templates/readme/exercise-started.md | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/markdown-templates/readme/exercise-started.md b/markdown-templates/readme/exercise-started.md
index 98d61dd..d57bf03 100644
--- a/markdown-templates/readme/exercise-started.md
+++ b/markdown-templates/readme/exercise-started.md
@@ -1,17 +1,15 @@
-# The exercise is ready for you 🧑🎓 :memo:
+# {{ title }}
Hey **{{ login }}**!
-This is your personal copy of the **{{ title }}** exercise.
-
-**Ready to get started?**
-
-[]({{{ issue_url }}})
-
-_You can come back to the exercise at any point in time if you decide to do it in parts!_
+Mona here. I'm done preparing your exercise. Hope you enjoy! 💚
+Remember, it's self-paced so feel fee to take a break! ☕️
+
+[]({{{ issue_url }}})
+
---
Get help: [Post in our discussion board](https://github.com/orgs/skills/discussions/categories/) • [Review the GitHub status page](https://www.githubstatus.com/)
From 840a022f34c6fc7fd5f180c71494f66bf19dae9f Mon Sep 17 00:00:00 2001
From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com>
Date: Mon, 7 Apr 2025 08:35:54 +0000
Subject: [PATCH 6/6] fix: update reference in start-exercise workflow to use
version v0.2.0
---
.github/workflows/start-exercise.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/start-exercise.yml b/.github/workflows/start-exercise.yml
index b6217b0..7195217 100644
--- a/.github/workflows/start-exercise.yml
+++ b/.github/workflows/start-exercise.yml
@@ -107,7 +107,7 @@ jobs:
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
- ref: start-exercise-updates
+ ref: v0.2.0
- name: Build welcome message from template
id: build-new-readme