From 4d930731496bea23c60a8d8447536875dcea8383 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Wed, 28 Nov 2018 22:46:02 -0500 Subject: [PATCH 01/16] add course preference for CLI --- config.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config.yml b/config.yml index f737f25..fe0744a 100644 --- a/config.yml +++ b/config.yml @@ -5,6 +5,17 @@ template: name: "github-slideshow" repo: "caption-this-template" description: "A robot powered training repository :robot:" +preferences: + - type: radio + name: gitTool + label: Preferred Git tool + description: Learn right from the web UI, or using your chosen tool. + options: + - label: Use the GitHub.com web interface + value: dotcom + - label: Use the command line + value: cli + before: - type: updateBranchProtection - type: createIssue From 06424eda8de8cb62acdcf5e6e256aa7d89a909ba Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Wed, 28 Nov 2018 23:01:07 -0500 Subject: [PATCH 02/16] use course preference for create a branch and a commit --- config.yml | 4 +++- responses/commit-something.md | 29 +++++++++++++++++++++++++++-- responses/create-a-branch.md | 21 ++++++++++++++++++++- 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/config.yml b/config.yml index fe0744a..3c5a69e 100644 --- a/config.yml +++ b/config.yml @@ -56,6 +56,8 @@ steps: body: "your-first-contribution.md" comments: - "create-a-branch.md" + data: + payload: '%payload%' - type: respond with: "head-to-branch.md" data: @@ -70,7 +72,7 @@ steps: issue: "Your first contribution" with: "commit-something.md" data: - branch: "%payload.ref%" + payload: "%payload%" - title: "Commit a file" description: "Commit your file to the branch." diff --git a/responses/commit-something.md b/responses/commit-something.md index 56f5b83..129bf3a 100644 --- a/responses/commit-something.md +++ b/responses/commit-something.md @@ -26,8 +26,33 @@ In the first field, type a commit message. The commit message should briefly tel The following steps will guide you through the process of committing a change on GitHub. +{% if preferences.gitTool === 'cli' %} +1. Check out to your branch: + ```shell + git checkout {{ payload.ref }} + ``` +1. Create a new file named `_posts/0000-01-02-{{ user.username }}.md`. +1. Add the following content to your file: + + --- + layout: slide + title: "Welcome to our second slide!" + --- + Your text + Use the left arrow to go back! + + +1. After adding the text, commit the change and a commit message, check out the **Commits 101** drop-down, just above these instructions: + ```shell + git commit -m "" + ``` +1. Push your new commit to GitHub: + ```shell + git push + ``` +{% else %} 1. Return to the "Code" tab -1. In the branch drop-down, select "{{ branch }}" +1. In the branch drop-down, select "{{ payload.ref }}" 1. Click **Create new file** 1. In the "file name" field, type `_posts/0000-01-02-{{ user.username }}.md` 1. When you’re done naming the file, add the following content to your file: @@ -42,6 +67,6 @@ The following steps will guide you through the process of committing a change on 1. After adding the text, you can commit the change by entering a commit message in the text-entry field below the file edit view. For guidelines on commit messages, check out the **Commits 101** drop-down, just above these instructions 1. When you’ve entered a commit message, click **Commit new file** - +{% endif %}

Return to this issue for my response

diff --git a/responses/create-a-branch.md b/responses/create-a-branch.md index 17321a8..777fe8c 100644 --- a/responses/create-a-branch.md +++ b/responses/create-a-branch.md @@ -23,10 +23,29 @@ The best way to keep branches organized with a team is to keep them concise and ### :keyboard: Activity: Your first branch +{% if preferences.gitTool === 'cli' %} +1. Open your preferred command line interface, which we'll call your shell from now on. +1. Clone this repository: + ```shell + git clone {{ payload.repository.clone_url }} + ``` +1. Navigate to the repository in your shell: + ```shell + cd {{ payload.repository.name }} + ``` +1. Create a branch, use whatever name you like: + ```shell + git branch + ``` +1. Push the branch to GitHub: + ``` + git push --set-upstream origin + ``` +{% else %} 1. Navigate to the “Code” tab 2. Click **Branch: master** in the drop-down 3. In the field, enter a name for your branch 4. Click **Create branch: ** or press the “Enter” key to create your branch - +{% endif %}

Return to this issue for my response

From cd622ce9778580b109f67b2639b96682f838ea4d Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Wed, 28 Nov 2018 23:12:22 -0500 Subject: [PATCH 03/16] add some line breaks after preference logic --- config.yml | 3 +- responses/commit-something.md | 82 ++++++++++++++++++----------------- responses/create-a-branch.md | 44 ++++++++++--------- 3 files changed, 67 insertions(+), 62 deletions(-) diff --git a/config.yml b/config.yml index 3c5a69e..0fa960d 100644 --- a/config.yml +++ b/config.yml @@ -9,13 +9,12 @@ preferences: - type: radio name: gitTool label: Preferred Git tool - description: Learn right from the web UI, or using your chosen tool. + description: Learn right from the web UI, or using your chosen tool options: - label: Use the GitHub.com web interface value: dotcom - label: Use the command line value: cli - before: - type: updateBranchProtection - type: createIssue diff --git a/responses/commit-something.md b/responses/commit-something.md index 129bf3a..a49f5b1 100644 --- a/responses/commit-something.md +++ b/responses/commit-something.md @@ -27,46 +27,50 @@ In the first field, type a commit message. The commit message should briefly tel The following steps will guide you through the process of committing a change on GitHub. {% if preferences.gitTool === 'cli' %} -1. Check out to your branch: - ```shell - git checkout {{ payload.ref }} - ``` -1. Create a new file named `_posts/0000-01-02-{{ user.username }}.md`. -1. Add the following content to your file: - - --- - layout: slide - title: "Welcome to our second slide!" - --- - Your text - Use the left arrow to go back! - - -1. After adding the text, commit the change and a commit message, check out the **Commits 101** drop-down, just above these instructions: - ```shell - git commit -m "" - ``` -1. Push your new commit to GitHub: - ```shell - git push - ``` + + 1. Check out to your branch: + ```shell + git checkout {{ payload.ref }} + ``` + 1. Create a new file named `_posts/0000-01-02-{{ user.username }}.md`. + 1. Add the following content to your file: + + --- + layout: slide + title: "Welcome to our second slide!" + --- + Your text + Use the left arrow to go back! + + + 1. After adding the text, commit the change and a commit message, check out the **Commits 101** drop-down, just above these instructions: + ```shell + git commit -m "" + ``` + 1. Push your new commit to GitHub: + ```shell + git push + ``` + {% else %} -1. Return to the "Code" tab -1. In the branch drop-down, select "{{ payload.ref }}" -1. Click **Create new file** -1. In the "file name" field, type `_posts/0000-01-02-{{ user.username }}.md` -1. When you’re done naming the file, add the following content to your file: - - --- - layout: slide - title: "Welcome to our second slide!" - --- - Your text - Use the left arrow to go back! - - -1. After adding the text, you can commit the change by entering a commit message in the text-entry field below the file edit view. For guidelines on commit messages, check out the **Commits 101** drop-down, just above these instructions -1. When you’ve entered a commit message, click **Commit new file** + + 1. Return to the "Code" tab + 1. In the branch drop-down, select "{{ payload.ref }}" + 1. Click **Create new file** + 1. In the "file name" field, type `_posts/0000-01-02-{{ user.username }}.md` + 1. When you’re done naming the file, add the following content to your file: + + --- + layout: slide + title: "Welcome to our second slide!" + --- + Your text + Use the left arrow to go back! + + + 1. After adding the text, you can commit the change by entering a commit message in the text-entry field below the file edit view. For guidelines on commit messages, check out the **Commits 101** drop-down, just above these instructions + 1. When you’ve entered a commit message, click **Commit new file** + {% endif %}

Return to this issue for my response

diff --git a/responses/create-a-branch.md b/responses/create-a-branch.md index 777fe8c..28d642a 100644 --- a/responses/create-a-branch.md +++ b/responses/create-a-branch.md @@ -24,28 +24,30 @@ The best way to keep branches organized with a team is to keep them concise and ### :keyboard: Activity: Your first branch {% if preferences.gitTool === 'cli' %} -1. Open your preferred command line interface, which we'll call your shell from now on. -1. Clone this repository: - ```shell - git clone {{ payload.repository.clone_url }} - ``` -1. Navigate to the repository in your shell: - ```shell - cd {{ payload.repository.name }} - ``` -1. Create a branch, use whatever name you like: - ```shell - git branch - ``` -1. Push the branch to GitHub: - ``` - git push --set-upstream origin - ``` + 1. Open your preferred command line interface, which we'll call your shell from now on. + 1. Clone this repository: + ```shell + git clone {{ payload.repository.clone_url }} + ``` + 1. Navigate to the repository in your shell: + ```shell + cd {{ payload.repository.name }} + ``` + 1. Create a branch, use whatever name you like: + ```shell + git branch + ``` + 1. Push the branch to GitHub: + ``` + git push --set-upstream origin + ``` {% else %} -1. Navigate to the “Code” tab -2. Click **Branch: master** in the drop-down -3. In the field, enter a name for your branch -4. Click **Create branch: ** or press the “Enter” key to create your branch + + 1. Navigate to the “Code” tab + 2. Click **Branch: master** in the drop-down + 3. In the field, enter a name for your branch + 4. Click **Create branch: ** or press the “Enter” key to create your branch + {% endif %}

Return to this issue for my response

From f253f282975fda894a357414bf4981b983c90169 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Wed, 28 Nov 2018 23:23:30 -0500 Subject: [PATCH 04/16] fix data for issue comment --- config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.yml b/config.yml index 0fa960d..33ce784 100644 --- a/config.yml +++ b/config.yml @@ -54,9 +54,9 @@ steps: title: "Your first contribution" body: "your-first-contribution.md" comments: - - "create-a-branch.md" - data: - payload: '%payload%' + - create-a-branch.md + data: + payload: '%payload%' - type: respond with: "head-to-branch.md" data: From 4d619daf49c2236738ad6247243def21f59e6777 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Wed, 28 Nov 2018 23:25:02 -0500 Subject: [PATCH 05/16] use a different name for data --- config.yml | 10 +++++----- responses/commit-something.md | 4 ++-- responses/create-a-branch.md | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config.yml b/config.yml index 33ce784..475a445 100644 --- a/config.yml +++ b/config.yml @@ -51,12 +51,12 @@ steps: actions: - type: createIssue action_id: contrib_issue - title: "Your first contribution" - body: "your-first-contribution.md" + title: Your first contribution + body: your-first-contribution.md comments: - create-a-branch.md - data: - payload: '%payload%' + data: + thePayload: '%payload%' - type: respond with: "head-to-branch.md" data: @@ -71,7 +71,7 @@ steps: issue: "Your first contribution" with: "commit-something.md" data: - payload: "%payload%" + thePayload: "%payload%" - title: "Commit a file" description: "Commit your file to the branch." diff --git a/responses/commit-something.md b/responses/commit-something.md index a49f5b1..f3ab8a3 100644 --- a/responses/commit-something.md +++ b/responses/commit-something.md @@ -30,7 +30,7 @@ The following steps will guide you through the process of committing a change on 1. Check out to your branch: ```shell - git checkout {{ payload.ref }} + git checkout {{ thePayload.ref }} ``` 1. Create a new file named `_posts/0000-01-02-{{ user.username }}.md`. 1. Add the following content to your file: @@ -55,7 +55,7 @@ The following steps will guide you through the process of committing a change on {% else %} 1. Return to the "Code" tab - 1. In the branch drop-down, select "{{ payload.ref }}" + 1. In the branch drop-down, select "{{ thePayload.ref }}" 1. Click **Create new file** 1. In the "file name" field, type `_posts/0000-01-02-{{ user.username }}.md` 1. When you’re done naming the file, add the following content to your file: diff --git a/responses/create-a-branch.md b/responses/create-a-branch.md index 28d642a..a1f26c5 100644 --- a/responses/create-a-branch.md +++ b/responses/create-a-branch.md @@ -27,11 +27,11 @@ The best way to keep branches organized with a team is to keep them concise and 1. Open your preferred command line interface, which we'll call your shell from now on. 1. Clone this repository: ```shell - git clone {{ payload.repository.clone_url }} + git clone {{ thePayload.repository.clone_url }} ``` 1. Navigate to the repository in your shell: ```shell - cd {{ payload.repository.name }} + cd {{ thePayload.repository.name }} ``` 1. Create a branch, use whatever name you like: ```shell From fe444587b15660d8d91d6d5e54fa5e74f8b122a8 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Wed, 28 Nov 2018 23:31:11 -0500 Subject: [PATCH 06/16] no triple === --- responses/commit-something.md | 2 +- responses/create-a-branch.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/responses/commit-something.md b/responses/commit-something.md index f3ab8a3..81b59dd 100644 --- a/responses/commit-something.md +++ b/responses/commit-something.md @@ -26,7 +26,7 @@ In the first field, type a commit message. The commit message should briefly tel The following steps will guide you through the process of committing a change on GitHub. -{% if preferences.gitTool === 'cli' %} +{% if preferences.gitTool == 'cli' %} 1. Check out to your branch: ```shell diff --git a/responses/create-a-branch.md b/responses/create-a-branch.md index a1f26c5..afb5530 100644 --- a/responses/create-a-branch.md +++ b/responses/create-a-branch.md @@ -23,7 +23,7 @@ The best way to keep branches organized with a team is to keep them concise and ### :keyboard: Activity: Your first branch -{% if preferences.gitTool === 'cli' %} +{% if preferences.gitTool == 'cli' %} 1. Open your preferred command line interface, which we'll call your shell from now on. 1. Clone this repository: ```shell From 03813a828782b8f790115e00d64e9dc0531826af Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Wed, 28 Nov 2018 23:34:17 -0500 Subject: [PATCH 07/16] undo the indents --- responses/commit-something.md | 72 +++++++++++++++++------------------ responses/create-a-branch.md | 42 ++++++++++---------- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/responses/commit-something.md b/responses/commit-something.md index 81b59dd..30f5721 100644 --- a/responses/commit-something.md +++ b/responses/commit-something.md @@ -28,48 +28,48 @@ The following steps will guide you through the process of committing a change on {% if preferences.gitTool == 'cli' %} - 1. Check out to your branch: - ```shell - git checkout {{ thePayload.ref }} - ``` - 1. Create a new file named `_posts/0000-01-02-{{ user.username }}.md`. - 1. Add the following content to your file: - - --- - layout: slide - title: "Welcome to our second slide!" - --- - Your text - Use the left arrow to go back! - - - 1. After adding the text, commit the change and a commit message, check out the **Commits 101** drop-down, just above these instructions: - ```shell - git commit -m "" - ``` - 1. Push your new commit to GitHub: - ```shell - git push - ``` +1. Check out to your branch: + ```shell + git checkout {{ thePayload.ref }} + ``` +1. Create a new file named `_posts/0000-01-02-{{ user.username }}.md`. +1. Add the following content to your file: + + --- + layout: slide + title: "Welcome to our second slide!" + --- + Your text + Use the left arrow to go back! + + +1. After adding the text, commit the change and a commit message, check out the **Commits 101** drop-down, just above these instructions: + ```shell + git commit -m "" + ``` +1. Push your new commit to GitHub: + ```shell + git push + ``` {% else %} - 1. Return to the "Code" tab - 1. In the branch drop-down, select "{{ thePayload.ref }}" - 1. Click **Create new file** - 1. In the "file name" field, type `_posts/0000-01-02-{{ user.username }}.md` - 1. When you’re done naming the file, add the following content to your file: +1. Return to the "Code" tab +1. In the branch drop-down, select "{{ thePayload.ref }}" +1. Click **Create new file** +1. In the "file name" field, type `_posts/0000-01-02-{{ user.username }}.md` +1. When you’re done naming the file, add the following content to your file: - --- - layout: slide - title: "Welcome to our second slide!" - --- - Your text - Use the left arrow to go back! + --- + layout: slide + title: "Welcome to our second slide!" + --- + Your text + Use the left arrow to go back! - 1. After adding the text, you can commit the change by entering a commit message in the text-entry field below the file edit view. For guidelines on commit messages, check out the **Commits 101** drop-down, just above these instructions - 1. When you’ve entered a commit message, click **Commit new file** +1. After adding the text, you can commit the change by entering a commit message in the text-entry field below the file edit view. For guidelines on commit messages, check out the **Commits 101** drop-down, just above these instructions +1. When you’ve entered a commit message, click **Commit new file** {% endif %}
diff --git a/responses/create-a-branch.md b/responses/create-a-branch.md index afb5530..81fec1d 100644 --- a/responses/create-a-branch.md +++ b/responses/create-a-branch.md @@ -24,29 +24,29 @@ The best way to keep branches organized with a team is to keep them concise and ### :keyboard: Activity: Your first branch {% if preferences.gitTool == 'cli' %} - 1. Open your preferred command line interface, which we'll call your shell from now on. - 1. Clone this repository: - ```shell - git clone {{ thePayload.repository.clone_url }} - ``` - 1. Navigate to the repository in your shell: - ```shell - cd {{ thePayload.repository.name }} - ``` - 1. Create a branch, use whatever name you like: - ```shell - git branch - ``` - 1. Push the branch to GitHub: - ``` - git push --set-upstream origin - ``` +1. Open your preferred command line interface, which we'll call your shell from now on. +1. Clone this repository: + ```shell + git clone {{ thePayload.repository.clone_url }} + ``` +1. Navigate to the repository in your shell: + ```shell + cd {{ thePayload.repository.name }} + ``` +1. Create a branch, use whatever name you like: + ```shell + git branch + ``` +1. Push the branch to GitHub: + ``` + git push --set-upstream origin + ``` {% else %} - 1. Navigate to the “Code” tab - 2. Click **Branch: master** in the drop-down - 3. In the field, enter a name for your branch - 4. Click **Create branch: ** or press the “Enter” key to create your branch +1. Navigate to the “Code” tab +2. Click **Branch: master** in the drop-down +3. In the field, enter a name for your branch +4. Click **Create branch: ** or press the “Enter” key to create your branch {% endif %}
From d8070d53c4c956ee70d2f2f2952767752e527080 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Wed, 28 Nov 2018 23:47:51 -0500 Subject: [PATCH 08/16] try data before the comment --- config.yml | 8 ++++---- responses/commit-something.md | 18 +++++++++--------- responses/create-a-branch.md | 24 ++++++++++++------------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/config.yml b/config.yml index 475a445..e45538d 100644 --- a/config.yml +++ b/config.yml @@ -53,10 +53,10 @@ steps: action_id: contrib_issue title: Your first contribution body: your-first-contribution.md - comments: - - create-a-branch.md data: thePayload: '%payload%' + comments: + - create-a-branch.md - type: respond with: "head-to-branch.md" data: @@ -69,9 +69,9 @@ steps: actions: - type: respond issue: "Your first contribution" - with: "commit-something.md" + with: commit-something.md data: - thePayload: "%payload%" + thePayload: '%payload%' - title: "Commit a file" description: "Commit your file to the branch." diff --git a/responses/commit-something.md b/responses/commit-something.md index 30f5721..b3e853f 100644 --- a/responses/commit-something.md +++ b/responses/commit-something.md @@ -29,9 +29,9 @@ The following steps will guide you through the process of committing a change on {% if preferences.gitTool == 'cli' %} 1. Check out to your branch: - ```shell - git checkout {{ thePayload.ref }} - ``` + ```shell + git checkout {{ thePayload.ref }} + ``` 1. Create a new file named `_posts/0000-01-02-{{ user.username }}.md`. 1. Add the following content to your file: @@ -44,13 +44,13 @@ The following steps will guide you through the process of committing a change on 1. After adding the text, commit the change and a commit message, check out the **Commits 101** drop-down, just above these instructions: - ```shell - git commit -m "" - ``` + ```shell + git commit -m "" + ``` 1. Push your new commit to GitHub: - ```shell - git push - ``` + ```shell + git push + ``` {% else %} diff --git a/responses/create-a-branch.md b/responses/create-a-branch.md index 81fec1d..6116f75 100644 --- a/responses/create-a-branch.md +++ b/responses/create-a-branch.md @@ -26,21 +26,21 @@ The best way to keep branches organized with a team is to keep them concise and {% if preferences.gitTool == 'cli' %} 1. Open your preferred command line interface, which we'll call your shell from now on. 1. Clone this repository: - ```shell - git clone {{ thePayload.repository.clone_url }} - ``` + ```shell + git clone {{ thePayload.repository.clone_url }} + ``` 1. Navigate to the repository in your shell: - ```shell - cd {{ thePayload.repository.name }} - ``` + ```shell + cd {{ thePayload.repository.name }} + ``` 1. Create a branch, use whatever name you like: - ```shell - git branch - ``` + ```shell + git branch + ``` 1. Push the branch to GitHub: - ``` - git push --set-upstream origin - ``` + ``` + git push --set-upstream origin + ``` {% else %} 1. Navigate to the “Code” tab From 767dd7558854b6d3adf8550614138c23019e03b5 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Wed, 28 Nov 2018 23:54:47 -0500 Subject: [PATCH 09/16] separate out comment after creating an issue --- config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config.yml b/config.yml index e45538d..9a08154 100644 --- a/config.yml +++ b/config.yml @@ -53,10 +53,11 @@ steps: action_id: contrib_issue title: Your first contribution body: your-first-contribution.md + - type: respond + with: create-a-branch.md + issue: Your first contribution data: thePayload: '%payload%' - comments: - - create-a-branch.md - type: respond with: "head-to-branch.md" data: From 757a2f3c3a8898e8d8a86f9aa5834a0e65e0470f Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Thu, 29 Nov 2018 00:08:32 -0500 Subject: [PATCH 10/16] fix some indents --- responses/commit-something.md | 38 +++++++++++++++-------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/responses/commit-something.md b/responses/commit-something.md index b3e853f..3da3dd7 100644 --- a/responses/commit-something.md +++ b/responses/commit-something.md @@ -27,22 +27,20 @@ In the first field, type a commit message. The commit message should briefly tel The following steps will guide you through the process of committing a change on GitHub. {% if preferences.gitTool == 'cli' %} - 1. Check out to your branch: ```shell git checkout {{ thePayload.ref }} ``` 1. Create a new file named `_posts/0000-01-02-{{ user.username }}.md`. 1. Add the following content to your file: - - --- - layout: slide - title: "Welcome to our second slide!" - --- - Your text - Use the left arrow to go back! - - + ```yaml + --- + layout: slide + title: "Welcome to our second slide!" + --- + Your text + Use the left arrow to go back! + ``` 1. After adding the text, commit the change and a commit message, check out the **Commits 101** drop-down, just above these instructions: ```shell git commit -m "" @@ -51,26 +49,22 @@ The following steps will guide you through the process of committing a change on ```shell git push ``` - {% else %} - 1. Return to the "Code" tab 1. In the branch drop-down, select "{{ thePayload.ref }}" 1. Click **Create new file** 1. In the "file name" field, type `_posts/0000-01-02-{{ user.username }}.md` 1. When you’re done naming the file, add the following content to your file: - - --- - layout: slide - title: "Welcome to our second slide!" - --- - Your text - Use the left arrow to go back! - - + ```yaml + --- + layout: slide + title: "Welcome to our second slide!" + --- + Your text + Use the left arrow to go back! + ``` 1. After adding the text, you can commit the change by entering a commit message in the text-entry field below the file edit view. For guidelines on commit messages, check out the **Commits 101** drop-down, just above these instructions 1. When you’ve entered a commit message, click **Commit new file** - {% endif %}

Return to this issue for my response

From 61cd43cde763797cfe47d74248cb01313b9eb858 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Thu, 29 Nov 2018 16:28:16 -0500 Subject: [PATCH 11/16] add remaining CLI options --- config.yml | 4 ++++ responses/pr-succeeds.md | 19 +++++++++++++++++++ responses/request-changes.md | 21 +++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/config.yml b/config.yml index 9a08154..cdfeaa6 100644 --- a/config.yml +++ b/config.yml @@ -138,6 +138,8 @@ steps: - type: createReview body: request-changes.md event: 'COMMENT' + data: + branch: '%payload.pull_request.head.ref%' - title: "Respond to a review" @@ -169,6 +171,8 @@ steps: - type: createReview body: pr-succeeds.md event: APPROVE + data: + branch: '%payload.pull_request.head.ref%' - title: "Merge your pull request" description: "Make your changes live by merging your PR." diff --git a/responses/pr-succeeds.md b/responses/pr-succeeds.md index b5d6eae..302bd8a 100644 --- a/responses/pr-succeeds.md +++ b/responses/pr-succeeds.md @@ -6,8 +6,27 @@ You successfully created a pull request, and it has passed all of the tests. You ### :keyboard: Activity: Merge the pull request +{% if preferences.gitTool == 'cli' %} +1. Check out to the `master` branch: + ```shell + git checkout master + ``` +2. Merge your branch: + ```shell + git merge {{ branch }} + ``` +3. Push the merged history to GitHub: + ```shell + git push + ``` +4. Delete your the branch locally: + ```shell + git branch -d {{ branch }} + ``` +{% else %} 1. Click **Merge pull request** 1. Click **Confirm merge** +{% endif %} 1. Once your branch has been merged, you don't need it anymore. Click **Delete branch**.
diff --git a/responses/request-changes.md b/responses/request-changes.md index 4cd148c..5122cc2 100644 --- a/responses/request-changes.md +++ b/responses/request-changes.md @@ -6,10 +6,31 @@ Let’s add some content to your file. Replace line 5 of your file with a quotat ### :keyboard: Activity: Change your file +{% if preferences.gitTool == 'cli' %} +1. Check out to your branch: + ```shell + git checkout {{ branch }} + ``` +1. Open the file `_posts/0000-01-02-{{ user.username }}.md`. +1. Replace line 5 of the file with something new. +1. Stage your new changes: + ```shell + git add _posts/0000-01-02-{{ user.username }}.md + ``` +1. Commit your changes: + ```shell + git commit -m "" + ``` +1. Push your edits to GitHub: + ```shell + git push + ``` +{% else %} 1. Click the "Files Changed" tab in this pull request 1. Click on the pencil icon found on the right side of the screen 1. Replace line 5 with something new 1. Scroll to the bottom and click **Commit Changes** +{% endif %}

Watch below for my response

From 821ba46310fb59df79326c2d5884da9100c9b720 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Thu, 29 Nov 2018 16:32:20 -0500 Subject: [PATCH 12/16] fix respond action --- config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config.yml b/config.yml index cdfeaa6..376344b 100644 --- a/config.yml +++ b/config.yml @@ -44,9 +44,9 @@ steps: issue: "Getting Started with GitHub" with: "close-issue.md" - - title: "Close an issue" - description: "Cease a conversation by closing an issue." - event: "issues.closed" + - title: Close an issue + description: Cease a conversation by closing an issue. + event: issues.closed link: https://github.com/{{ user.username }}/{{ course.template.name }}/issues/1 actions: - type: createIssue @@ -59,9 +59,9 @@ steps: data: thePayload: '%payload%' - type: respond - with: "head-to-branch.md" + with: head-to-branch.md data: - issueURL: "%actions.contrib_issue.data.html_url%" + issueURL: '%actions.contrib_issue.data.html_url%' - title: "Create a branch" description: "Create a branch for introducing new changes." From eb4e5418f727571e9cacfba6d07cba606365c066 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Thu, 29 Nov 2018 16:41:04 -0500 Subject: [PATCH 13/16] use issue title from API call --- config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yml b/config.yml index 376344b..9c70cc7 100644 --- a/config.yml +++ b/config.yml @@ -55,7 +55,7 @@ steps: body: your-first-contribution.md - type: respond with: create-a-branch.md - issue: Your first contribution + issue: '%actions.contrib_issue.data.title%' data: thePayload: '%payload%' - type: respond From 2e8ec032d21ba6db1c871739a58c4fbb11056669 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Thu, 29 Nov 2018 16:44:18 -0500 Subject: [PATCH 14/16] add forgotten comment to issue --- config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yml b/config.yml index 9c70cc7..3da6afc 100644 --- a/config.yml +++ b/config.yml @@ -54,8 +54,8 @@ steps: title: Your first contribution body: your-first-contribution.md - type: respond + issue: Your first contribution with: create-a-branch.md - issue: '%actions.contrib_issue.data.title%' data: thePayload: '%payload%' - type: respond From 6ad6acab103efa74efa2eb6de0a774273c8c444c Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Thu, 29 Nov 2018 16:52:38 -0500 Subject: [PATCH 15/16] use the comments option again --- config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config.yml b/config.yml index 3da6afc..c7e60a6 100644 --- a/config.yml +++ b/config.yml @@ -53,9 +53,8 @@ steps: action_id: contrib_issue title: Your first contribution body: your-first-contribution.md - - type: respond - issue: Your first contribution - with: create-a-branch.md + comments: + - create-a-branch.md data: thePayload: '%payload%' - type: respond From 2455e7eee2adea6f3135cabcd3f9aaaaac25d838 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Thu, 29 Nov 2018 16:58:10 -0500 Subject: [PATCH 16/16] remember to stage before committing --- responses/commit-something.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/responses/commit-something.md b/responses/commit-something.md index 3da3dd7..22b3911 100644 --- a/responses/commit-something.md +++ b/responses/commit-something.md @@ -41,6 +41,10 @@ The following steps will guide you through the process of committing a change on Your text Use the left arrow to go back! ``` +1. Stage your new file: + ```shell + git add _posts/0000-01-02-{{ user.username }}.md + ``` 1. After adding the text, commit the change and a commit message, check out the **Commits 101** drop-down, just above these instructions: ```shell git commit -m ""