Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 3396a67

Browse files
authored
Merge pull request #3 from githubtraining/release-prep
Prepare course for release
2 parents c2b9897 + f480832 commit 3396a67

17 files changed

+691
-150
lines changed

LICENSE

Lines changed: 395 additions & 0 deletions
Large diffs are not rendered by default.

config.yml

Lines changed: 191 additions & 124 deletions
Large diffs are not rendered by default.

course-details.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
1-
This is the description we show on the course page [here](https://lab.github.com/githubtraining/write-github-script). This first paragraph will be featured at the top of the page so make it great.
2-
1+
[GitHub Script](https://github.com/actions/github-script) is a special action that allows using [octokit/rest.js](https://octokit.github.io/rest.js/v17) directly in a workflow file.
32

4-
5-
Be sure to tell the learner about the technology you are teaching, why they should learn it, how they can use it, and what you will teach them.
6-
3+
Over the duration of this course you will learn the skills needed to begin using the GitHub Script action to interact with your repository which will save you from creating full blown actions that carry unnecessary overhead.
74

5+
## What you'll learn
86

9-
Include information on how they can reach you for questions about the content or course.
7+
In this course you will learn how to:
8+
9+
- Use GitHub Script in your workflow
10+
- Comment on issues using octokit
11+
- Add issues to a project board using octokit
12+
- Use the workflow expression syntax to filter when jobs run in a workflow.
13+
14+
## What you'll build
15+
16+
![A user opens an issue, the GitHub Actions bot responds with a welcome message. Another window shows that the issue has been added to a project board.](https://user-images.githubusercontent.com/16547949/78669798-cf8b2e80-78aa-11ea-885e-65e72fa22379.png)
17+
18+
In this course you will automatically generate a comment on every new issue using a templated response. Additionally, if this issue is labeled as a bug it will be automatically added to the "needs triage" column of a project board.
19+
20+
## Prerequisites
21+
22+
We first recommend taking the following courses:
23+
24+
- [Hello, GitHub Actions!](https://lab.github.com/github/hello-github-actions!) to learn the basics of how GitHub Actions work
25+
- [GitHub Actions: Continuous Integration](https://lab.github.com/githubtraining/github-actions:-continuous-integration) to dive deeper into a workflow file
26+
27+
## Projects used
28+
29+
This makes use of the following open source projects. Consider exploring these repos and maybe even making contributions!
30+
31+
- [GitHub Script](https://github.com/actions/github-script), a unique action that provides an authenticated octokit client and allows JavaScript to be written directly in a workflow file.
32+
33+
## Audience
34+
35+
Developers, DevOps Engineers, students, teams

responses/00_welcome-activity.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Your repository can contain multiple **workflow** files that carry out a wide va
2020

2121
📖 Read more about [workflows](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#choosing-the-type-of-actions-for-your-workflow)
2222

23-
### :keyboard: Activity: Respond to an issue when it get's opened
23+
### :keyboard: Activity: Respond to an issue when it gets opened
2424

2525
1. Create a new workflow file titled `.github/workflows/my-workflow.yml` with the following contents:
2626
You can use [this quicklink]({{quicklink}}) to easily create this file
@@ -49,17 +49,21 @@ Your repository can contain multiple **workflow** files that carry out a wide va
4949
```
5050
5151
1. Commit the workflow to a new branch.
52-
1. Create a pull request titled **Create my-workflow.yml**.
53-
1. Supply the pull request body content and click `Create pull request`.
52+
1. Create a pull request. I suggest a title like **Automate issue responses**.
53+
1. Supply the pull request body content and click **Create pull request**.
5454
55-
_It is important to place meaningful content into the body of the pull requests you create throughout this course. This repository will stay with you long after you complete the course. It is advisable that you use the body of the pull requests you create as a way to take long lived notes about thing you want to remember._
55+
<details><summary>About pull pull request titles and content</summary>
5656
57-
<details><summary>Suggested body content</summary>
57+
It is important to place meaningful content into the body of the pull requests you create. This repository will stay with you long after you complete the course. We recommend you use the body of your pull requests as a way to take long lived notes about thing you want to remember.
5858
59-
`Workflow files are the recipe for task automation. This is where actions are placed if I want to use them for a task.`
59+
In practice, good pull request titles and content convey information efficiently to your collaborators.
60+
61+
You can fill the body of this pull request with the following recommended content:
62+
63+
> Workflow files are the recipe for task automation. This is where actions are placed if I want to use them for a task.
6064
6165
</details>
6266
6367
---
6468
65-
I'll respond in the new pull request when I detect it has been created.
69+
I am waiting for you to create a new pull request before moving on.

responses/01_merge-workflow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Let's go ahead and do this now.
88

99
### :keyboard: Activity: Merge the workflow
1010

11-
When you are ready, merge this pull request.
11+
1. Merge this pull request.
1212

1313
---
1414

15-
Once you have merged this pull request I will open a new issue so we can see this workflow in action!
15+
I am waiting for you to merge this pull request before moving on.
1616

17-
Oh, I'll also be responding to you from that issue!
17+
Once you have merged this pull request I will open a new issue so we can see this workflow in action!
1818

1919
<details><summary>Trouble merging?</summary>Try refreshing the page!</details>

responses/02_workflow-triggered.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
types: [opened]
1111
```
1212
13-
This means that every time an issue get's opened in this repository the GitHub Script you wrote will execute.
13+
This means that every time an issue gets opened in this repository the GitHub Script you wrote will execute.
1414
1515
You should expect to see the result right here in this issue!
1616

responses/03_add-to-projects.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Let's add a card to a project board
22

3-
We have added a project board to this repository for you. We will use this board, named **Learning Lab Project Board**, to add cards to when a new issue is created in your repository!
3+
We have added [a project board]({{ store.projectUrl }}) to this repository for you. We will use this board, named **Learning Lab Project Board**, to add cards to when a new issue is created in your repository!
44

55
Like creating comments and opening pull requests, octokit/rest.js can be used for many more types of interactions. Managing GitHub Projects makes that list!
66

@@ -45,9 +45,11 @@ We've gone ahead and done this on our end of things so that we could give you th
4545
```
4646
4747
2. Commit the workflow to a new branch.
48-
3. Create a pull request titled **Update my-workflow.yml**.
49-
4. Supply the pull request body content and click `Create pull request`.
48+
3. Create a pull request, I suggest the title **Add issues to project board**.
49+
4. Supply the pull request body content and click **Create pull request**.
5050
5151
---
5252
53+
I am waiting for you to create a new pull request before moving on.
54+
5355
I'll respond in the new pull request when I detect it has been created.

responses/04_merge-workflow.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@{{user.login}}, you're a rockstar ✨
44

5-
You'r workflow now has the necessary updates for us to have new issues automatically added to the triage board when they are created!
5+
Your workflow now has the necessary updates for us to have new issues automatically added to the triage board when they are created!
66

77
Like before, this workflow has a trigger that pertains to the repository as a whole, rather than just this branch, we will need to merge this pull request before we can start using it.
88

@@ -14,6 +14,8 @@ When you are ready, merge this pull request.
1414

1515
---
1616

17+
I am waiting for you to merge this pull request before moving on.
18+
1719
Once you have merged this pull request I will open a new issue so we can see this workflow in action!
1820

1921
<details><summary>Trouble merging?</summary>Try refreshing the page!</details>

responses/06_steps-activity.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
We will make the following changes to the current workflow file:
44

5-
- Name each step so we can easily keep track of it in the [actions tab]({{actionTab}})
5+
- Name each step so we can easily keep track of it in the [actions tab]({{store.actionsUrl}})
66
- Use expressions to determine `if` a step should execute
77

88
### :keyboard: Activity: Add newly opened issue to project board
99

10-
1. [Edit]({{quicklink}}) the current workflow `.github/workflows/my-workflow.yml` to have he following contents:
10+
1. [Edit]({{quicklink}}) the current workflow `.github/workflows/my-workflow.yml` to have the following contents:
1111

1212
```yaml
1313
name: Learning GitHub Script
@@ -47,9 +47,11 @@ We will make the following changes to the current workflow file:
4747
```
4848
4949
2. Commit the workflow to a new branch.
50-
3. Create a pull request titled **Update my-workflow.yml**.
51-
4. Supply the pull request body content and click `Create pull request`.
50+
3. Create a pull request, I suggest the title **Create better comments**.
51+
4. Supply the pull request body content and click **Create pull request**.
5252
5353
---
5454
55+
I am waiting for you to create a new pull request before moving on.
56+
5557
I'll respond in the pull request you create

responses/07_use-fs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,6 @@ We will make the following changes to the current workflow file:
5555
5656
---
5757
58+
I am waiting for you to commit the desired changes to this branch before moving on.
59+
5860
I'll respond once you've committed the changes to this branch

0 commit comments

Comments
 (0)