Skip to content

Mention new "OWNER:REPO:BRANCH" pattern in "Comparing across forks" #34381

Closed

Description

@muzimuzhi

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits#comparing-across-forks

What part(s) of the article would you like to see updated?

The section Comparing across forks only mentions the OWNER:BRANCH pattern to specify a compare branch in a three-dot comparison, but recently GitHub started using a new OWNER:REPO:BRANCH pattern.

To compare branches on different repositories, preface the branch names with user names. For example, by specifying octocat:main for base and octo-org:main for compare, you can compare the main branch of the repositories respectively owned by octocat and octo-org.

Here's an example of a comparison between two repositories.

The new pattern can be found in the URL of "Open pull request" pages. Such pages can be opened by visiting https://github.com/OWNER/REPO/pull/new/BRANCH or by clicking the "Open pull request" button in the page of a branch ahead of upstream default branch.

For example,

Additional information

The old form OWNER:BRANCH still works, though I don't know which one is preferable by the GitHub.

For example, https://github.com/github/docs/compare/main...muzimuzhi:gh34381-update-basehead-form?expand=1 still works.

Activity

  1. added
    contentThis issue or pull request belongs to the Docs Content team
    on Aug 22, 2024
  2. added
    triageDo not begin working on this issue until triaged by the team
    on Aug 22, 2024
  3. changed the title [-]Mention new "OWNER:REPO:BRANCH" form in "Comparing across forks"[/-] [+]Mention new "OWNER:REPO:BRANCH" pattern in "Comparing across forks"[/+] on Aug 22, 2024
  4. added
    waiting for reviewIssue/PR is waiting for a writer's review
    pull requestsContent related to pull requests
    and removed
    triageDo not begin working on this issue until triaged by the team
    on Aug 22, 2024
  5. nguyenalex836 commented on Aug 22, 2024

    @nguyenalex836
    Contributor

    @muzimuzhi Thank you for opening an issue! I'll get this triaged for review ✨

  6. muzimuzhi commented on Aug 22, 2024

    @muzimuzhi
    ContributorAuthor

    The corresponding API docs may need a similar update, for example the doc of basehead path parameter of REST API endpoint for "Compare to commits".

    Not sure if there are any similar GraphQL APIs.

  7. added
    needs SMEThis proposal needs review from a subject matter expert
    on Sep 6, 2024
  8. github-actions commented on Sep 6, 2024

    @github-actions
    Contributor

    Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert 👀

  9. github-actions commented on Oct 5, 2024

    @github-actions
    Contributor

    This is a gentle bump for the docs team that this issue is waiting for technical review.

  10. added
    help wantedAnyone is welcome to open a pull request to fix this issue
    SME reviewedAn SME has reviewed this issue/PR
    and removed
    SME staleThe request for an SME has staled
    waiting for reviewIssue/PR is waiting for a writer's review
    needs SMEThis proposal needs review from a subject matter expert
    on Oct 7, 2024
  11. nguyenalex836 commented on Oct 14, 2024

    @nguyenalex836
    Contributor

    @muzimuzhi Thank you for your patience while our SME team reviewed! Upon review, our SMEs found we should add the following sentence to this section https://docs.github.com/en/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits#comparing-across-forks:

    You can also preface the branch name with a user name and a repository name. For example, specifying octocat:awesome-app:main would use the main branch in the octocat/awesome-app repository. This can be useful in large organisations, where you might have an upstream repository and a fork both owned by the organisation. For more information, see "AUTOTITLE."

    I've added the help wanted label so that you, or anyone else can open a PR for this update 💛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SME reviewedAn SME has reviewed this issue/PRcontentThis issue or pull request belongs to the Docs Content teamhelp wantedAnyone is welcome to open a pull request to fix this issuepull requestsContent related to pull requests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions