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

Prepare course for release #3

Merged
merged 45 commits into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
cd38341
Create LICENSE
mattdavis0351 Mar 24, 2020
d4b40ed
Merge branch 'master' into release-prep
mattdavis0351 Mar 24, 2020
a4e950c
update course-details.md
mattdavis0351 Mar 24, 2020
9afb6f0
store test
mattdavis0351 Mar 25, 2020
c9cb46d
store test
mattdavis0351 Mar 25, 2020
189aba9
store test
mattdavis0351 Mar 25, 2020
6b61ae7
checking store
mattdavis0351 Mar 25, 2020
ee35913
typo fix
mattdavis0351 Mar 25, 2020
0b2e0f0
typo fix
mattdavis0351 Mar 25, 2020
b073086
remove store in before
mattdavis0351 Mar 26, 2020
a9b78c4
add reslut.data back
mattdavis0351 Mar 26, 2020
ec9f620
no use of result.data to find what it looks like
mattdavis0351 Mar 26, 2020
0a35834
broke again
mattdavis0351 Mar 26, 2020
1b9d44c
add registration.store
mattdavis0351 Mar 26, 2020
115ac1d
template fixing
mattdavis0351 Mar 26, 2020
380126d
more store testing
mattdavis0351 Mar 26, 2020
abe60a6
check getTree store vs action_id
mattdavis0351 Mar 26, 2020
ee53c33
more prep for release
mattdavis0351 Mar 26, 2020
303974e
update config
mattdavis0351 Mar 26, 2020
a295b6a
fix typo
mattdavis0351 Mar 26, 2020
493a894
fix typo
mattdavis0351 Mar 26, 2020
4d30633
checking new event trigger
mattdavis0351 Mar 26, 2020
19c3ac5
another workflow test
mattdavis0351 Mar 26, 2020
1899c90
add more dynamic values to config
mattdavis0351 Mar 26, 2020
94bacbc
fix typo
mattdavis0351 Mar 26, 2020
96ef12b
remove store from octokit call
mattdavis0351 Mar 26, 2020
e8257f0
fix course link numbers
mattdavis0351 Mar 26, 2020
28f2a41
changing event triggers
mattdavis0351 Mar 26, 2020
398efe3
fix typo
hectorsector Mar 30, 2020
5948e15
link to the created project board
hectorsector Mar 30, 2020
129c467
fix some typos
hectorsector Mar 30, 2020
413f99e
use store instead of action_id
mattdavis0351 Mar 30, 2020
a34153e
Merge branch 'release-prep' of https://github.com/githubtraining/writ…
mattdavis0351 Mar 30, 2020
947f38b
remove old action_id references, store works here
mattdavis0351 Mar 30, 2020
45536e7
use better pull naming
mattdavis0351 Mar 30, 2020
6518b31
add a tag
hectorsector Apr 2, 2020
7ad5054
clean up the first step a bit
hectorsector Apr 2, 2020
837455e
validate learner's merging first PR
hectorsector Apr 2, 2020
4b4b15c
clean up second step a bit
hectorsector Apr 3, 2020
ec26229
s/registration.store/store
hectorsector Apr 3, 2020
c719dcc
add remaining validations
hectorsector Apr 3, 2020
7be42b4
typo for pullUrl
hectorsector Apr 3, 2020
ead9d07
fix typo on issue link
hectorsector Apr 3, 2020
fe4ea22
use the store for the actions link
hectorsector Apr 3, 2020
f480832
add image of working issue
hectorsector Apr 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
395 changes: 395 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

315 changes: 191 additions & 124 deletions config.yml

Large diffs are not rendered by default.

38 changes: 32 additions & 6 deletions course-details.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
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.
[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.

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.
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.

## What you'll learn

Include information on how they can reach you for questions about the content or course.
In this course you will learn how to:

- Use GitHub Script in your workflow
- Comment on issues using octokit
- Add issues to a project board using octokit
- Use the workflow expression syntax to filter when jobs run in a workflow.

## What you'll build

![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)

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.

## Prerequisites

We first recommend taking the following courses:

- [Hello, GitHub Actions!](https://lab.github.com/github/hello-github-actions!) to learn the basics of how GitHub Actions work
- [GitHub Actions: Continuous Integration](https://lab.github.com/githubtraining/github-actions:-continuous-integration) to dive deeper into a workflow file

## Projects used

This makes use of the following open source projects. Consider exploring these repos and maybe even making contributions!

- [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.

## Audience

Developers, DevOps Engineers, students, teams
18 changes: 11 additions & 7 deletions responses/00_welcome-activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Your repository can contain multiple **workflow** files that carry out a wide va

📖 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)

### :keyboard: Activity: Respond to an issue when it get's opened
### :keyboard: Activity: Respond to an issue when it gets opened

1. Create a new workflow file titled `.github/workflows/my-workflow.yml` with the following contents:
You can use [this quicklink]({{quicklink}}) to easily create this file
Expand Down Expand Up @@ -49,17 +49,21 @@ Your repository can contain multiple **workflow** files that carry out a wide va
```

1. Commit the workflow to a new branch.
1. Create a pull request titled **Create my-workflow.yml**.
1. Supply the pull request body content and click `Create pull request`.
1. Create a pull request. I suggest a title like **Automate issue responses**.
1. Supply the pull request body content and click **Create pull request**.

_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._
<details><summary>About pull pull request titles and content</summary>

<details><summary>Suggested body content</summary>
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.

`Workflow files are the recipe for task automation. This is where actions are placed if I want to use them for a task.`
In practice, good pull request titles and content convey information efficiently to your collaborators.

You can fill the body of this pull request with the following recommended content:

> Workflow files are the recipe for task automation. This is where actions are placed if I want to use them for a task.

</details>

---

I'll respond in the new pull request when I detect it has been created.
I am waiting for you to create a new pull request before moving on.
6 changes: 3 additions & 3 deletions responses/01_merge-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Let's go ahead and do this now.

### :keyboard: Activity: Merge the workflow

When you are ready, merge this pull request.
1. Merge this pull request.

---

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

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

<details><summary>Trouble merging?</summary>Try refreshing the page!</details>
2 changes: 1 addition & 1 deletion responses/02_workflow-triggered.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
types: [opened]
```

This means that every time an issue get's opened in this repository the GitHub Script you wrote will execute.
This means that every time an issue gets opened in this repository the GitHub Script you wrote will execute.

You should expect to see the result right here in this issue!

Expand Down
8 changes: 5 additions & 3 deletions responses/03_add-to-projects.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Let's add a card to a project board

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!
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!

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!

Expand Down Expand Up @@ -45,9 +45,11 @@ We've gone ahead and done this on our end of things so that we could give you th
```

2. Commit the workflow to a new branch.
3. Create a pull request titled **Update my-workflow.yml**.
4. Supply the pull request body content and click `Create pull request`.
3. Create a pull request, I suggest the title **Add issues to project board**.
4. Supply the pull request body content and click **Create pull request**.

---

I am waiting for you to create a new pull request before moving on.

I'll respond in the new pull request when I detect it has been created.
4 changes: 3 additions & 1 deletion responses/04_merge-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

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

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.

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

---

I am waiting for you to merge this pull request before moving on.

Once you have merged this pull request I will open a new issue so we can see this workflow in action!

<details><summary>Trouble merging?</summary>Try refreshing the page!</details>
10 changes: 6 additions & 4 deletions responses/06_steps-activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

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

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

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

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

```yaml
name: Learning GitHub Script
Expand Down Expand Up @@ -47,9 +47,11 @@ We will make the following changes to the current workflow file:
```

2. Commit the workflow to a new branch.
3. Create a pull request titled **Update my-workflow.yml**.
4. Supply the pull request body content and click `Create pull request`.
3. Create a pull request, I suggest the title **Create better comments**.
4. Supply the pull request body content and click **Create pull request**.

---

I am waiting for you to create a new pull request before moving on.

I'll respond in the pull request you create
2 changes: 2 additions & 0 deletions responses/07_use-fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ We will make the following changes to the current workflow file:

---

I am waiting for you to commit the desired changes to this branch before moving on.

I'll respond once you've committed the changes to this branch
2 changes: 2 additions & 0 deletions responses/08_merge-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ When you are ready, merge this pull request.

---

I am waiting for you to merge this pull request before moving on.

Once you have merged this pull request I will open a new issue so we can see this workflow in action!

<details><summary>Trouble merging?</summary>Try refreshing the page!</details>
2 changes: 2 additions & 0 deletions responses/09_issue-activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@

---

I am waiting for you to open a new issue before moving on.

I'll respond in your new issue once you've opened it
3 changes: 3 additions & 0 deletions responses/e-action-result.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Oops!

It seems like there is an issue with your workflow run. You'll need to head to the actions tab to troubleshoot your workflow
3 changes: 3 additions & 0 deletions responses/e-generic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Oops! I was expecting you to take **{{ expected }}**.

I'll respond when you take the expected action.
7 changes: 7 additions & 0 deletions responses/e-result.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# action_id

{{actionIdData}}

# result

{{resultData}}
2 changes: 1 addition & 1 deletion responses/new-issue.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## A new issue has been opened

I have created a [new issue]({{issueURL}}) where we will continue this lesson. Click the link to meet me over there.
I have created a [new issue]({{issueUrl}}) where we will continue this lesson. Click the link to meet me over there.
24 changes: 24 additions & 0 deletions server-installation-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## GitHub Enterprise Server (GHES) installation notes

<!-- start compatibility header, pick one of the options below, add or remove detail as necessary -->

| 🚫 | This course needs features not yet supported by GHES. |
| --- | ----------------------------------------------------- |


This course makes use of [GitHub Actions](https://github.com/features/actions), a feature that is currently available for GitHub.com but not available on GHES.

<!-- /end compatibility header -->

### Course dependencies

The following are dependencies of the course. The course may continue to work without these dependencies, but learners won't experience the course as designed.

<!-- this table contains some options, remove (or add) rows as you see necessary for your course -->

| Dependency | Required? | Reason | Alternative |
| -------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GHES must be able to reach githubusercontent.com | Yes | Images used throughout the course are served from this domain. Learners will find broken images required to take the course without this access. | Manually download the images referenced in the `responses/` folder, upload them to an accessible domain, and replace the images in the `responses/` folder. |
| Learner must be able to reach github.com and outside web | Yes | Links are provided to resources that live on the outside web. | Without access to resources on the outside web, learners will reach blocked resources. You can change the links to these resources in the `responses/` folder, and in the template repository. |

|
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy