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

Commit dd511d2

Browse files
authored
Merge pull request #73 from githubtraining/use-deleteBranch
Use deleteBranch and creattePullRequestComment instead of type: octokit
2 parents e343378 + 8c23782 commit dd511d2

File tree

2 files changed

+25
-49
lines changed

2 files changed

+25
-49
lines changed

config.yml

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,8 @@ steps:
6666
right: "approved"
6767
- type: mergeBranch
6868
head: game-instructions
69-
- type: octokit
70-
method: gitdata.deleteReference
71-
owner: "%payload.repository.owner.login%"
72-
repo: "%payload.repository.name%"
73-
ref: heads/game-instructions
69+
- type: deleteBranch
70+
branch: game-instructions
7471
- type: createPullRequest
7572
title: Change Tetris Colors
7673
body: 04_requesting-changes.md
@@ -107,11 +104,8 @@ steps:
107104
- type: mergeBranch
108105
head: add-multiple-colors
109106
base: update-colors
110-
- type: octokit
111-
method: gitdata.deleteReference
112-
owner: "%payload.repository.owner.login%"
113-
repo: "%payload.repository.name%"
114-
ref: heads/add-multiple-colors
107+
- type: deleteBranch
108+
branch: add-multiple-colors
115109
- type: respond
116110
with: 05_changes-requested.md
117111

@@ -125,11 +119,8 @@ steps:
125119
operator: ===
126120
right: "approved"
127121
- type: mergePullRequest
128-
- type: octokit
129-
method: gitdata.deleteReference
130-
owner: "%payload.repository.owner.login%"
131-
repo: "%payload.repository.name%"
132-
ref: heads/update-colors
122+
- type: deleteBranch
123+
branch: update-colors
133124
- type: respond
134125
with: 08-suggest.md
135126
data:
@@ -153,36 +144,13 @@ steps:
153144
else:
154145
type: respond
155146
with: fix-body.md
156-
- type: octokit
157-
method: pullRequests.createComment
158-
owner: "%payload.repository.owner.login%"
159-
repo: "%payload.repository.name%"
160-
number: "%payload.pull_request.number%"
161-
path: README.md
162-
body: |
163-
```suggestion
164-
You can play the game on the GitHub Pages site for this repository.
165-
```
166-
167-
Thanks for opening this pull request, @%user.username%.
168-
169-
I've made a suggested change to this pull request because I think you should link your version of the game in your README file. I made this suggestion by creating a review comment that uses some :sparkle: special :sparkle: formatting.
170-
It looks like this:
171-
172-
```suggestion
173-
You can play the game on the GitHub Pages site for this repository.
174-
```
175-
176-
### :keyboard: Activity: Apply the suggestion
177-
178-
1. Click **Apply suggestion**
179-
2. Enter a commit message
180-
3. Click **Commit changes**
181-
182-
For more information about suggest changes, check out this [GitHub Help](https://help.github.com/articles/incorporating-feedback-in-your-pull-request) article.
183-
184-
commit_id: "%payload.pull_request.head.sha%"
147+
- type: createPullRequestComment
148+
file: README.md
149+
body: 08-suggest-pr.md
185150
position: 5
151+
data:
152+
# !! We don't ask the learner to turn on pages, so this is just a guess and won't translate to GHES
153+
pagesUrl: https://%user.username%.github.io/github-games/
186154

187155
- title: Apply the suggestion
188156
description: Implement a change from a suggested change.

responses/08-suggest-pr.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
Thanks for opening this pull request, @{{ user.username}}.
22

3+
```suggestion
4+
You can play the game at: {{ pagesUrl }}
5+
```
6+
37
I've made a suggested change to this pull request because I think you should link your version of the game in your README file. I made this suggestion by creating a review comment that uses some :sparkle: special :sparkle: formatting.
48

59
It looks like this:
610

7-
```
8-
```suggestion
9-
You can play the game at: {{ pagesUrl }}
10-
```
11-
```
11+
```suggestion
12+
You can play the game at: {{ pagesUrl }}
13+
```
14+
15+
### :keyboard: Activity: Apply the suggestion
16+
17+
1. Click **Apply suggestion**
18+
2. Enter a commit message
19+
3. Click **Commit changes**
1220

1321
For more information about suggested changes, check out this [GitHub Help](https://help.github.com/articles/incorporating-feedback-in-your-pull-request) article.

0 commit comments

Comments
 (0)