Skip to content

Commit 885f55b

Browse files
committed
fix: edits from group review
1 parent 034a2a2 commit 885f55b

File tree

2 files changed

+66
-9
lines changed

2 files changed

+66
-9
lines changed

github-git/pull-request.md

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ myst_html_meta:
1616
"property=og:locale": "en_US"
1717
---
1818

19-
# How to Submit a GitHub Pull Request
19+
# About Pull Requests
2020

2121
In the last lesson, you learned how to [make and commit a change to a document in a GitHub repository](edit-commit-files).
2222
In this lesson, you will learn how to submit a pull request after making changes to a file in a GitHub repository.
@@ -27,9 +27,14 @@ A GitHub pull request (**PR**):
2727
1. **Supports Review**: A pull request also triggers a review process where other repository owners and users can review and comment on your changes and suggest edits to your changes line-by-line. This makes incorporateing your changes fully transparent.
2828
1. **Maintainers to manage contributions**: PRs allow maintainers to document, approve, and merge contributions into the project in a consistent way.
2929

30+
> **<i class="fa-solid fa-handshake-angle" style="color: #81c0aa;"></i> Social cue:**
31+
> A pull request is a **collaborative tool**—it lets maintainers review changes
32+
> before merging them. PRs **show transparency** and let others give feedback,
33+
> making sure every update aligns with the project's goals.
34+
3035
Pull requests empower you to contribute to the work of others in an open and accessible way, even if you don't have direct access to the repository.
3136

32-
## The steps
37+
## How to Submit a GitHub Pull Request
3338

3439
### Step 1: Open your GitHub pull request
3540

@@ -64,13 +69,42 @@ In this example, you want to update:
6469
* **base**: `pyopensci/pyos-demo-package-contribute` with
6570
* **head**: commits in your fork `your-username/pyos-demo-package-contribute`.
6671

72+
73+
> **<i class="fa-solid fa-code-branch" style="color: #81c0aa;"></i> Social Tip:**
74+
> Choosing the correct **head** and **base** repositories ensures that your changes
75+
> go to the right place. If you accidentally select the wrong base, your PR might not
76+
> reach the maintainers you intended. Double-check this before submitting!
77+
6778
The above pull request configuration tells **GitHub** to update the base repository with contents from your forked repository or the head repository.
6879

69-
### Step 3: Verify changes in your pull request
80+
81+
### Set up a pull request: base vs. head
82+
83+
When creating a **pull request (PR)**, you must define where your changes should be added and where they come from.
84+
85+
- **<i class="fa-solid fa-database" style="color: #81c0aa;"></i> Base:** The repository where you want your changes to be merged. *(This is usually the original repo you forked.)*
86+
- **<i class="fa-solid fa-code-branch" style="color: #81c0aa;"></i> Head:** The repository containing your changes. *(This is your fork. The copy of the repo that you own, where you made edits.)*
87+
88+
> **🔹 Quick way to remember:** The **head** is "ahead" of the base, meaning it has new changes that the base repository does **not** yet have.
89+
90+
:::{todo}
91+
92+
/images/github/base-vs-head.png
93+
:alt: "Diagram showing how base and head work in GitHub pull requests."
94+
Create Graphic: Simple diagram with arrows from "Your Fork (Head)" → "Original Repo (Base)"
95+
96+
:::
97+
98+
### Step 3: Review your own pull request first
7099

71100
When comparing repositories in a **pull request (PR)**, GitHub provides a **diff view** of changes between files (diff as in difference). Before submitting the pr, carefully review these changes to ensure that what you intended to submit is in the PR (and nothing else).
72101

73-
Since others will review your PR, take time to **clean up unnecessary changes** before submitting. your time upfront will lead to the PR being merged sooner and will make it easier for others to review.
102+
Since others will review your PR, take time to **clean up unnecessary changes** before submitting. Your time upfront will lead to the PR being merged sooner and will make it easier for others to review.
103+
104+
> **<i class="fa-solid fa-magnifying-glass" style="color: #81c0aa;"></i> Social cue:**
105+
> A PR isn't just about submitting changes—it’s about **communicating clearly** with
106+
> maintainers. A well-reviewed PR with **only relevant changes** is easier to merge.
107+
> **Check that your PR doesn’t include unintended file modifications.**
74108
75109
Before you submit your PR, check:
76110

@@ -93,20 +127,34 @@ Once you've reviewed your PR and everything looks good, it's time to submit it.
93127
Add a descriptive title and write a brief description of your changes. Pull request titles should be concise and descriptive of the content in the pull request. When you have added your
94128
title and description, click on “Create Pull Request” one more time to submit the PR.
95129

130+
> **<i class="fa-solid fa-pen-to-square" style="color: #81c0aa;"></i> Social cue:**
131+
> A **clear, descriptive PR title** helps maintainers quickly understand your changes.
132+
> A good title is specific: **"Fix typo in README"** is better than **"Updated file"**.
133+
> Your description should also **explain why** the change was made.
134+
96135
If you go to the parent repository, you will see the PR listed there.
97136

98137
:::{tip}
99138
You can modify the title and description of your pull request at any time - even after you've submitted the pull request.
100139
:::
101140

102-
## Close a Pull Request
141+
## Close or move a Pull Request to draft
142+
143+
Sometimes, after opening a pull request, you realize it's **not quite ready for review**. In that case, you have two options:
103144

104-
You can close a PR anytime via the **Close pull request** button if you're not ready to submit. You can reopen it later if needed.
145+
1. **<i class="fa-solid fa-file-pen" style="color: #81c0aa;"></i> Convert it to a draft** – A draft pull request signals to maintainers that your PR is **still in progress** and not yet ready for review.
146+
2. **<i class="fa-solid fa-xmark" style="color: #81c0aa;"></i> Close the PR** – You can close a PR anytime via the **Close pull request** button and reopen it later when you're ready to submit.
105147

106-
## Who Can Merge a Pull Request?
148+
## Who can merge a pull request?
107149

108150
When you create a **pull request (PR)**, GitHub directs you to the parent repository (e.g., the pyOpenSci repo). At the bottom of the PR, a **Merge Pull Request** button appears, which only the **repository owner** or collaborators can use after reviewing your changes.
109151

152+
> **<i class="fa-solid fa-user-shield" style="color: #81c0aa;"></i> Social cue:**
153+
> Only maintainers can merge PRs, but **you can make their job easier**!
154+
> - **Be responsive** if they ask for changes.
155+
> - **Follow repository guidelines** for PR structure.
156+
> - **Check for review comments** and update your PR accordingly.
157+
110158
The repo owner may request modifications before merging. Any future commits to the same branch will be added to the PR until it is merged.
111159

112160
::: {note}

github-git/your-first-contribution.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ og:image:alt: An image that shows the steps for contributing to open source on G
2020

2121
# Mastering GitHub Collaboration Skills
2222

23+
Contributing to open source in a public space like GitHub can feel intimidating. You may not know the project maintainers, feel unsure about your GitHub skills, or wonder where to begin.
24+
25+
This lesson series will teach you how to collaborate on code and documentation using GitHub. It will help you confidently contribute to a GitHub repository and build skills to collaborate with colleagues (some of whom you may not have met in real life!).
26+
2327
(first-contribution)=
2428

2529
## Get started with your first open source contribution
@@ -174,9 +178,14 @@ Once your PR is open, it's time to sit back and wait for the maintainers, collab
174178

175179
## Many people's first contributions are to documentation
176180

177-
In this lesson, you make your first open source contribution by updating documentation (including docstrings) rather than code. Many people start with small fixes like typos, which are simpler to contribute as you don't always need a development environment but are still valuable. Developers often focus on code, leaving less time for writing and editing documentation. So your small contributions can have a large impact.
181+
In this lesson, you make your first open source contribution by updating documentation (including docstrings) rather than code. Many people start with small fixes like typos, which are simpler to contribute as you don't always need a development environment but are still **highly valuable**.
182+
183+
### <i class="fa-solid fa-rocket"></i> Fresh eyes make a difference! <i class="fa-solid fa-rocket"></i>
184+
185+
When you’re new to a project, you may notice gaps and unclear explanations that long-time contributors might overlook. Maintainers and developers are often too close to their own work to see what’s missing. Your perspective helps make the project more accessible to future contributors.
186+
187+
By catching confusing phrasing, outdated information, or missing details (even in contributing documentation), you improve the onboarding experience for others while making a meaningful first contribution!
178188

179-
Further, if you go to contribute and find that the contributing guidelines lack detail, that could also be a useful place for you to start.
180189

181190
:::{admonition} A real-life first contribution to PyPI
182191

0 commit comments

Comments
 (0)