Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pr ex] Ex intro #15

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# PR-training - Exercise

This exercise covers some of the topics in [DIME Analytic's GitHub PR training](https://osf.io/umqzn/).

## Import the training repo

We have prepared a repo you will work in, but first you need to copy it to your account. Follow these instructions to do so:

1. Go to https://github.com/new/import
2. Use `https://github.com/dime-worldbank/gh-pr-ex-repo` in the URL field
3. You can name your repo whatever you want, but it might be easier to follow these instructions if you keep the name `gh-pr-ex-repo`
4. You can make the repo either _private_ or _public_
5. Then click `Begin import`
6. Wait until the import is done and then click the link when it says that your new repo is ready.

### Invite someone to your repo (optional)

You can do these exercises by yourself and be both the _author_ role and the _reviewer_ role. But you can also pair up with someone and invite each other to the repos so you can be different roles on each other's repos. To invite someone, follow the steps below. All you must replace `<username>` with your GitHub username in all URLs below.

1. Go to `https://github.com/<username>/gh-pr-ex-repo/settings/access`
2. Click `Invite a collaborator`
3. Enter the GitHub username of the person you paired up with and click to add them to the repository
4. They will be sent an email from GitHub, but you can also send them this link `https://github.com/<username>/gh-pr-ex-repo/invitations` and ask them to click it.

They are succesfully added to your repo when their status no longer says "_Pending invite_".

## Exercise 1 - review a PR

In this exercise you are the PI
and you created the very simple Stata script `ex1\stata-1.do`.
Open that file in the `main` branch.
This file runs in Stata,
but you do not need to run anything or
not even know any Stata to follow along in this exercise.
You can see that you have only loaded the data set,
and added some place holders where you want your RA to add code.

Your RA has already done the work. Go to the `Pull request` tab and see PR number 1 that they have already created.