You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62-4Lines changed: 62 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ For each repository, use the GitHub CLI tool to:
97
97
## Create Work GitHub Repository
98
98
99
99
Let's first create a work GitHub repository based on the current repository.
100
-
We will use it for toying arround, messing it up and fixing it.
100
+
We will use it for toying around, messing it up and fixing it.
101
101
102
102
First, make sure you are in the local directory clone of this repository (`workshop-github`).
103
103
Then, create a repository on GitHub from the command line (using GitHub CLI - `gh`):
@@ -173,13 +173,13 @@ For that, in the GitHub web interface for the pull request follow the steps:
173
173
174
174
1. Click the `Review changes` button.
175
175
176
-
1. Approve the pull request.
176
+
1. Aim to approve your pull request.
177
+
You cannot approve your pull request, if you're the author.
177
178
178
179
1. Now, get back to the `Conversation` tab.
179
-
See that the pull request is now approved.
180
180
Go below to the `Merge pull request` button.
181
181
182
-
Below clicking the button, see the options from the little dropdown option on the right.
182
+
Below clicking the button, see the options from the little drop-down option on the right.
183
183
See what are the options, choose one and do it.
184
184
185
185
### Do It Yourself
@@ -200,6 +200,64 @@ For that, in the GitHub web interface for the pull request follow the steps:
200
200
Create at least one pull request with two commits.
201
201
Use the `Squash and merge` merge strategy.
202
202
203
+
## Approve Pull Request
204
+
205
+
In order to approve a pull request, you need to have another user able to approve your pull requests.
206
+
207
+
Before everything, reset the repository:
208
+
209
+
```console
210
+
./gh-reset-repo.sh
211
+
```
212
+
213
+
And create the pull request, as above.
214
+
215
+
To add someone to be able to approve your pull requests, they need to have `Triage` permissions.
216
+
For this, do the following:
217
+
218
+
1. Go to the `Settings` tab in the GitHub web view of your repository.
219
+
220
+
1. Go to the `Collaborators` entry in the left menu.
221
+
You'll have to provide your GitHub password, or use some other authentication method.
222
+
223
+
1. Ask someone around you for their GitHub username.
224
+
Add them to the repository as collaborator.
225
+
226
+
1. Ask them to confirm the invite via e-mail or by accessing the invitation URL: `https://github.com/<your-github-username>/workshop-github/invitations`
227
+
228
+
1. Ask them to approve your pull request.
229
+
230
+
1. Now merge the pull request.
231
+
232
+
## Require Approval for Pull Requests
233
+
234
+
We want to enforce an approval for our pull requests.
235
+
236
+
Before everything, reset the repository:
237
+
238
+
```console
239
+
./gh-reset-repo.sh
240
+
```
241
+
242
+
And create the pull request, as above.
243
+
244
+
Now add a ruleset to add a required approval condition.
245
+
For this, do the following:
246
+
247
+
1. Go to the `Settings` tab in the GitHub web view of your repository.
248
+
249
+
1. Go to the `Branches` entry in the left menu.
250
+
251
+
1. Click `Add branch ruleset`.
252
+
253
+
1. Check `Require a pull request before merging`.
254
+
255
+
1. Add `1` to `Required approvals`.
256
+
257
+
1. Now ask for an approval for your pull request, as above.
258
+
259
+
1. Merge the pull request with the approval now done.
260
+
203
261
## Configure Merge Strategy
204
262
205
263
We want to configure `Rebase and merge` as the only merge strategy.
0 commit comments