Skip to content

Commit 0d909e5

Browse files
dihydroJenoxideCopilotCopilotvgrlSiaraMist
authored
Refactor pull request concepts around developer jobs-to-be-done (#62071)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Vanessa <vgrl@github.com> Co-authored-by: Siara <108543037+SiaraMist@users.noreply.github.com> Copilot-Session: fc48eebe-a846-4e0d-a78a-359e3db86192
1 parent c588e70 commit 0d909e5

74 files changed

Lines changed: 1212 additions & 693 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ featuredLinks:
77
- /repositories/creating-and-managing-repositories
88
- /get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
99
popular:
10-
- /pull-requests/concepts/about-pull-requests
10+
- /pull-requests/reference/pull-requests
1111
- /authentication
1212
- /copilot/how-tos/get-code-suggestions/get-ide-code-suggestions
1313
- /get-started/git-basics/managing-remote-repositories
@@ -84,7 +84,6 @@ children:
8484
- desktop
8585
- early-access
8686
- support
87-
8887
- contributing
8988
- github-models
9089
- nonprofit
@@ -179,21 +178,22 @@ externalProducts:
179178
electron:
180179
id: electron
181180
name: Electron
182-
href: 'https://electronjs.org/docs/latest'
181+
href: https://electronjs.org/docs/latest
183182
external: true
184183
codeql:
185184
id: codeql
186185
name: CodeQL query writing
187-
href: 'https://codeql.github.com/docs'
186+
href: https://codeql.github.com/docs
188187
external: true
189188
npm:
190189
id: npm
191190
name: npm
192-
href: 'https://docs.npmjs.com/'
191+
href: https://docs.npmjs.com/
193192
external: true
194193
gh-wa:
195194
id: gh-wa
196195
name: GitHub Well-Architected
197-
href: 'https://wellarchitected.github.com/'
196+
href: https://wellarchitected.github.com/
198197
external: true
199198
---
199+

content/pull-requests/concepts/about-pull-request-reviews.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

content/pull-requests/concepts/about-status-checks.md

Lines changed: 0 additions & 77 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Deploying code
3+
shortTitle: Deploy code
4+
intro: 'Validate pre-deployment checks, choose merge strategies, and manage branches effectively when deploying code.'
5+
versions:
6+
fpt: '*'
7+
ghes: '*'
8+
ghec: '*'
9+
contentType: concepts
10+
---
11+
12+
The final step for a pull request is to get finished work into the deployment branch. This usually means merging your changes into the release or main branch. Before that happens, you will need to confirm that the change meets the project's requirements.
13+
14+
## Validating pre-deployment checks
15+
16+
Before you merge, you will confirm that the change is safe to deploy. **Status checks** show whether commits meet the conditions set for the repository, such as continuous integration builds, tests, code scanning, or deployment checks. They help you and reviewers understand whether a pull request is ready to merge.
17+
18+
Repositories often require certain conditions before a pull request can merge, including:
19+
20+
* Required status checks that must pass, such as application health and readiness checks run by your deployment pipeline.
21+
* Required reviews or code owner approvals.
22+
* Merge conflicts must be resolved.
23+
24+
Protected branches enforce these requirements so deployment branches stay stable.
25+
26+
Not all checks are the same. Rich checks created by products like {% data variables.product.prodname_actions %} can report detailed logs and annotations, while simpler commit statuses can be posted by a variety of connected systems. Understanding these helps you interpret why a pull request is or isn't ready.
27+
28+
## Merging code into the release or main branch
29+
30+
When the requirements are met, you merge the pull request to bring its commits into the base branch. You can also automate merging so a pull request merges as soon as its requirements are met. Pull requests offer different merge strategies depending on how you want the repository history to look:
31+
32+
* **Merge commit** preserves every commit from the pull request branch and adds an explicit merge point.
33+
* **Squash and merge** combines all commits into a single commit for a concise history.
34+
* **Rebase and merge** adds each commit onto the base branch for a linear history without a merge commit.
35+
36+
The best strategy depends on how much detail your team wants to preserve.
37+
38+
## Enforcing requirements at scale
39+
40+
As merging gets busier, teams add controls to keep merges safe and predictable:
41+
42+
* **Rulesets and branch protections** can require an up-to-date branch, signed commits, linear history, or specific status checks before merging.
43+
* A **merge queue** lets a high-traffic protected branch accept many pull requests without breaking. It tests each one against the latest version of the base branch and merges them in order once checks pass. When a branch uses a merge queue, the available merge options differ from a standard merge.
44+
45+
> [!NOTE]
46+
> {% data reusables.gated-features.merge-queue %}
47+
48+
## Connecting merges to deployment
49+
50+
Merging is often the trigger that ships code. {% data variables.product.prodname_actions %} can run deployment workflows when a pull request merges into a release or main branch. **Deployment environments** add another layer of pre-deployment safety: you can require specific reviewers, wait timers, or branch restrictions before a deployment proceeds, and these are surfaced alongside your other checks.
51+
52+
## Recovering after a merge
53+
54+
Even with checks in place, some merges need to be undone. You can revert a merged pull request to create a new pull request that reverses the changes. Be aware, a pull request can be marked as merged *indirectly* on rare occasions, if its commits reach the base branch through another path. This can bypass the protections on that specific pull request. See [AUTOTITLE](/pull-requests/how-tos/merge-and-close-pull-requests/reverting-a-pull-request) and [AUTOTITLE](/pull-requests/reference/pull-request-merges#indirect-merges).
55+
56+
## Closing pull requests that won't be merged
57+
58+
Not every pull request should merge. If a change is no longer needed or is superseded by other work, you can close the pull request without merging it. Closing keeps the discussion and history for reference while signaling that the change will not move forward.
59+
60+
After a pull request is merged or closed, its head branch is often no longer needed. Deleting unused branches keeps the repository easier to navigate.
61+
62+
## Further reading
63+
64+
* [AUTOTITLE](/pull-requests/how-tos/merge-and-close-pull-requests/merging-a-pull-request)
65+
* [AUTOTITLE](/pull-requests/reference/status-checks)
66+
* [AUTOTITLE](/actions/how-tos/deploy/configure-and-manage-deployments/manage-environments)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Giving reviews
3+
shortTitle: Give reviews
4+
intro: 'Provide feedback on pull requests by commenting on changes, suggesting edits, and approving or requesting updates before merging code.'
5+
versions:
6+
fpt: '*'
7+
ghes: '*'
8+
ghec: '*'
9+
contentType: concepts
10+
---
11+
12+
Reviewing pull requests is one of the main ways people collaborate on {% data variables.product.github %}. When you review a peer's work, you help catch issues early, share knowledge, and decide whether a change is ready to merge.
13+
14+
## Commenting on changes
15+
16+
Anyone with read access can review and comment on proposed changes. As a reviewer, you can:
17+
18+
* Leave general feedback on the overall pull request.
19+
* Comment on specific lines to ask questions or explain concerns.
20+
* Suggest exact changes that the author can apply with a single click.
21+
22+
Review conversations appear in the pull request timeline so the whole team can follow the discussion and track decisions.
23+
24+
## Requesting changes and approving
25+
26+
When you finish a review, you submit it with a decision that tells the author what to do next:
27+
28+
* **Comment** leaves general feedback without explicitly approving or requesting changes.
29+
* **Approve** signals that the changes are ready to merge.
30+
* **Request changes** flags feedback that the author should address before the pull request merges.
31+
32+
## Reviewing changes with more depth
33+
34+
Thorough reviews go beyond reading the diff top to bottom. {% data variables.product.github %} gives you tools to review large or complex changes with precision:
35+
36+
* **Review one file at a time**, mark each file as **Viewed** to collapse it, and use the progress bar to track how much of the pull request you've covered.
37+
* **Assess security and dependencies.** Dependency review shows how a pull request changes dependencies and whether it introduces known vulnerabilities, and code scanning surfaces alerts on the proposed changes.
38+
{% ifversion fpt or ghec %}
39+
* **Automate reviews with {% data variables.product.prodname_copilot_short %}.** {% data variables.product.prodname_copilot_short %} can perform automated code reviews on a pull request, comment on specific lines, and suggest changes, helping you catch common issues before a human reviewer looks at the code.
40+
{% endif %}
41+
42+
## Further reading
43+
44+
* [AUTOTITLE](/pull-requests/get-started/reviewing-pull-requests-quickstart)
45+
* [AUTOTITLE](/pull-requests/how-tos/review-pull-requests/reviewing-dependency-changes-in-a-pull-request)
46+
{% ifversion fpt or ghec %}
47+
* [AUTOTITLE](/copilot/concepts/agents/code-review).
48+
{% endif %}

0 commit comments

Comments
 (0)