Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .github/instructions/all.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ When you create a pull request:

3. Label with "llm-generated".
4. If an issue exists, include "fixes owner/repo#issue" or "towards owner/repo#issue" as appropriate.
5. Always _escape backticks_ when you use gh cli.
5. Always create PRs in **draft mode** using `--draft` flag.
6. Always _escape backticks_ when you use gh cli.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ After initializing a pull request, you'll see a review page that shows a high-le

Once you've created a pull request, you can push commits from your topic branch to add them to your existing pull request. These commits will appear in chronological order within your pull request and the changes will be visible in the "Files changed" tab.

Other contributors can review your proposed changes, add review comments, contribute to the pull request discussion, and even add commits to the pull request. {% ifversion pull-request-approval-limit %}{% data reusables.pull_requests.code-review-limits %}{% endif %}
Other contributors can review your proposed changes, add review comments, contribute to the pull request discussion, and even add commits to the pull request. {% ifversion pull-request-approval-limit %}By default, in public repositories, any user can submit reviews that approve or request changes to a pull request. Organization owners and repository admins can limit who is able to give approving pull request reviews or request changes. For more information, see [AUTOTITLE](/organizations/managing-organization-settings/managing-pull-request-reviews-in-your-organization) and [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-pull-request-reviews-in-your-repository).{% endif %}

{% ifversion fpt or ghec %}
You can see information about the branch's current deployment status and past deployment activity on the "Conversation" tab. See [AUTOTITLE](/repositories/viewing-activity-and-data-for-your-repository/viewing-deployment-activity-for-your-repository).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: About pull request reviews
intro: 'Reviews allow collaborators to comment on the changes proposed in pull requests, approve the changes, or request further changes before the pull request is merged. Repository administrators can require that all pull requests are approved before being merged.'
intro: 'Collaborate on pull requests to improve code quality.'
redirect_from:
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews
- /articles/about-pull-request-reviews
Expand All @@ -14,51 +14,31 @@ topics:
- Pull requests
shortTitle: About PR reviews
---
## About pull request reviews

After a pull request is opened, anyone with _read_ access can review and comment on the changes it proposes. You can also suggest specific changes to lines of code, which the author can apply directly from the pull request. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request).
Pull request reviews are one of the primary ways people collaborate on {% data variables.product.github %}. Reviewers can comment on changes, suggest improvements, and approve or request changes before code is merged. This collaborative process enables teams to ensure code quality and share knowledge.

{% ifversion pull-request-approval-limit %}{% data reusables.pull_requests.code-review-limits %}{% endif %}
{% raw %}<a href="https://github.com/pulls/review-requested?ref_product=github&ref_type=engagement&ref_style=button" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>View pull requests awaiting your review</span></a>{% endraw %}

Repository owners and collaborators can request a pull request review from a specific person. Organization members can also request a pull request review from a team with read access to the repository. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review). You can specify a subset of team members to be automatically assigned in the place of the whole team. For more information, see [AUTOTITLE](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team).
## Reviewing pull requests

Reviews allow for discussion of proposed changes and help ensure that the changes meet the repository's contributing guidelines and other quality standards. You can define which individuals or teams own certain types or areas of code in a CODEOWNERS file. When a pull request modifies code that has a defined owner, that individual or team will automatically be requested as a reviewer. For more information, see [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners).
Anyone with read access can review and comment on proposed changes. When submitting a review, choose one of three statuses:

For an introduction to requesting and providing pull request reviews, see the [Review pull requests](https://github.com/skills/review-pull-requests) {% data variables.product.prodname_learning %} course.
* **Comment**: Share feedback without approving or requesting changes.
* **Approve**: Approve the changes for merging.
* **Request changes**: Identify issues that must be fixed before merging.

{% ifversion fpt or ghec %}You can schedule reminders for pull requests that need to be reviewed. For more information, see [AUTOTITLE](/organizations/organizing-members-into-teams/managing-scheduled-reminders-for-your-team).{% endif %}
You can comment on specific lines, suggest changes for authors to apply directly, and discuss implementation approaches. Reviews appear in the conversation timeline and merge box. Mark conversation threads as resolved to track addressed feedback.

A review has three possible statuses:
* **Comment:** Submit general feedback without explicitly approving the changes or requesting additional changes.
* **Approve:** Submit feedback and approve merging the changes proposed in the pull request.
* **Request changes:** Submit feedback that must be addressed before the pull request can be merged.
## Requesting reviews

{% data reusables.repositories.request-changes-tips %}

You can view all of the reviews a pull request has received in the Conversation timeline, and you can see reviews by repository owners and collaborators in the pull request's merge box.

![Screenshot of the merge box for a pull request. A review by Octocat with requested changes is listed.](/assets/images/help/pull_requests/merge_box/pr-reviews-in-merge-box.png)

{% data reusables.search.requested_reviews_search_tip %}

{% data reusables.pull_requests.resolving-conversations %}

## Re-requesting a review

{% data reusables.pull_requests.re-request-review %}
Repository owners and collaborators can request reviews from specific people or teams. When you define code owners in a CODEOWNERS file, they're automatically requested as reviewers when a pull request modifies their code. You can re-request reviews after making significant changes.

## Required reviews

{% data reusables.pull_requests.required-reviews-for-prs-summary %} For more information, see [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-pull-request-reviews-before-merging).

> [!TIP]
> If necessary, people with _admin_ or _write_ access to a repository can dismiss a pull request review. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review).
Repository administrators can require approvals before pull requests are merged, ensuring code quality and preventing accidental merges. For more information, see [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-pull-request-reviews-before-merging).

## Further reading

* [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)
* [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/viewing-a-pull-request-review)
* [AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors){% ifversion copilot %}
* [AUTOTITLE](/copilot/using-github-copilot/code-review/using-copilot-code-review)
* [AUTOTITLE](/copilot/using-github-copilot/coding-agent/using-copilot-to-work-on-an-issue){% endif %}{% ifversion code-quality %}
* [AUTOTITLE](/code-security/code-quality/tutorials/fix-findings-in-prs){% endif %}
* [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review)
* Learn more in the [Review pull requests](https://github.com/skills/review-pull-requests?ref_product=github&ref_type=engagement&ref_style=text) {% data variables.product.prodname_learning %} course
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,23 @@ To reply to an existing line or file comment, you'll need to navigate to the com

Anyone watching the pull request or repository will receive a notification of your comments. Batching your comments avoids multiple notifications being sent. {% ifversion copilot %}If you are commenting on a pull request created by {% data variables.product.prodname_copilot_short %}, batching your comments prevents {% data variables.product.prodname_copilot_short %} from starting to work on individual comments before you have completed your review. See [AUTOTITLE](/copilot/using-github-copilot/coding-agent/using-copilot-to-work-on-an-issue).{% endif %}

{% data reusables.pull_requests.resolving-conversations %}
### Resolving conversations

You can resolve a conversation in a pull request if you opened the pull request or if you have write access to the repository where the pull request was opened.

To indicate that a conversation on the **Files changed** tab is complete, click **Resolve conversation**.

The entire conversation will be collapsed and marked as resolved, making it easier to find conversations that still need to be addressed.

If the suggestion in a comment is out of your pull request's scope, you can open a new issue that tracks the feedback and links back to the original comment. For more information, see [AUTOTITLE](/issues/tracking-your-work-with-issues/creating-an-issue#creating-an-issue-from-a-comment).

#### Discovering and navigating conversations

You can discover and navigate to all the conversations in your pull request using the **Conversations** menu that's shown at the top of the **Files Changed** tab.

From this view, you can see which conversations are unresolved, resolved, and outdated. This makes it easy to discover and resolve conversations.

![Screenshot of the "Conversations" menu on the "Files Changed" tab of a pull request.](/assets/images/help/pull_requests/conversations-menu.png)

## Further reading

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ Each person who suggested a change included in the commit will be a co-author of

## Re-requesting a review

{% data reusables.pull_requests.re-request-review %}
You can re-request a review, for example, after you've made substantial changes to your pull request.
To request a fresh review from a reviewer, in the sidebar of the **Conversation** tab, click the {% octicon "sync" aria-label="The sync icon" %} icon.

## Opening an issue for an out-of-scope suggestion

Expand Down
1 change: 0 additions & 1 deletion data/reusables/pull_requests/code-review-limits.md

This file was deleted.

2 changes: 0 additions & 2 deletions data/reusables/pull_requests/re-request-review.md

This file was deleted.

17 changes: 0 additions & 17 deletions data/reusables/pull_requests/resolving-conversations.md

This file was deleted.

1 change: 1 addition & 0 deletions data/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ footer:
machine: Some of this content may be machine- or AI-translated.
journey_landing:
articles: '{{ number }} Articles'
articles_heading: Articles
product_landing:
article_grid:
heading: Articles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,10 @@ async function getApplicableVersionFromLiquidTag(conditionStr: string) {
const ands = ver.split(' and ')
const firstAnd = ands[0].split(' ')[0]
// if all ands don't start with the same version it's invalid
// Note: This edge case (e.g., "fpt and ghes >= 3.1") doesn't occur in our content.
// All actual uses have matching versions (e.g., "ghes and ghes > 3.19").
// If this edge case appears in the future, additional logic would be needed here.
if (!ands.every((and) => and.startsWith(firstAnd))) {
// noop - we don't handle this case
// TODO - handle this case in the future
return []
}
const andValues = []
Expand Down
27 changes: 17 additions & 10 deletions src/content-linter/tests/category-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ describe.skip('category pages', () => {
// otherwise, if one of them has no categories, the tests will fail.
for (const tuple of productTuples) {
const [, productIndex] = tuple

const productDir = path.dirname(productIndex)

// Get links included in product index page.
// Each link corresponds to a product subdirectory (category).
// Example: "getting-started-with-github"
// Note: We need to read this synchronously here because vitest's describe.each
// can't asynchronously define tests
const contents = fs.readFileSync(productIndex, 'utf8')
const data = getFrontmatterData(contents)

const productDir = path.dirname(productIndex)

const children: string[] = data.children
const categoryLinks = children
// Only include category directories, not standalone category files like content/actions/quickstart.md
Expand Down Expand Up @@ -118,15 +121,19 @@ describe.skip('category pages', () => {
await contextualize(req as ExtendedRequest, res as Response, next)
await shortVersions(req as ExtendedRequest, res as Response, next)

// Read the product index data for rendering
const productIndexContents = await fs.promises.readFile(productIndex, 'utf8')
const productIndexData = getFrontmatterData(productIndexContents)

// Save the index title for later testing
indexTitle = data.title.includes('{')
? await renderContent(data.title, req.context, { textOnly: true })
: data.title

if (data.shortTitle) {
indexShortTitle = data.shortTitle.includes('{')
? await renderContent(data.shortTitle, req.context, { textOnly: true })
: data.shortTitle
indexTitle = productIndexData.title.includes('{')
? await renderContent(productIndexData.title, req.context, { textOnly: true })
: productIndexData.title

if (productIndexData.shortTitle) {
indexShortTitle = productIndexData.shortTitle.includes('{')
? await renderContent(productIndexData.shortTitle, req.context, { textOnly: true })
: productIndexData.shortTitle
} else {
indexShortTitle = ''
}
Expand Down
1 change: 1 addition & 0 deletions src/fixtures/fixtures/data/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ footer:
machine: Some of this content may be machine- or AI-translated.
journey_landing:
articles: '{{ number }} Articles'
articles_heading: Articles
product_landing:
article_grid:
heading: Articles
Expand Down
1 change: 0 additions & 1 deletion src/fixtures/tests/minitoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import cheerio from 'cheerio'
import { getDOM } from '@/tests/helpers/e2etest'

describe('minitoc', () => {
// TODO disable the mini TOC tests when we replace it with sticky TOC header
test('renders mini TOC in articles with more than one heading', async () => {
const $: cheerio.Root = await getDOM('/en/get-started/minitocs/multiple-headings')
expect($('h2#in-this-article').length).toBe(1)
Expand Down
2 changes: 1 addition & 1 deletion src/fixtures/tests/playwright-rendering.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ test.describe('Journey Tracks', () => {

// Verify track has proper structure
const firstTrack = tracks.first()
await expect(firstTrack.locator('h3')).toBeVisible() // Track title
await expect(firstTrack.locator('h2')).toBeVisible() // Track title
await expect(firstTrack.locator('p')).toBeVisible() // Track description
})

Expand Down
Loading
Loading