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

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

Closed
1 task done
muzimuzhi opened this issue Aug 22, 2024 · 5 comments · Fixed by #34927
Closed
1 task done

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

muzimuzhi opened this issue Aug 22, 2024 · 5 comments · Fixed by #34927
Labels
content This issue or pull request belongs to the Docs Content team help wanted Anyone is welcome to open a pull request to fix this issue pull requests Content related to pull requests SME reviewed An SME has reviewed this issue/PR

Comments

@muzimuzhi
Copy link
Contributor

muzimuzhi commented Aug 22, 2024

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.

@muzimuzhi muzimuzhi added the content This issue or pull request belongs to the Docs Content team label Aug 22, 2024
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Aug 22, 2024
@muzimuzhi muzimuzhi changed the title Mention new "OWNER:REPO:BRANCH" form in "Comparing across forks" Mention new "OWNER:REPO:BRANCH" pattern in "Comparing across forks" Aug 22, 2024
@nguyenalex836 nguyenalex836 added waiting for review Issue/PR is waiting for a writer's review pull requests Content related to pull requests and removed triage Do not begin working on this issue until triaged by the team labels Aug 22, 2024
@nguyenalex836
Copy link
Contributor

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

@muzimuzhi
Copy link
Contributor Author

muzimuzhi commented Aug 22, 2024

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.

@nguyenalex836 nguyenalex836 added the needs SME This proposal needs review from a subject matter expert label Sep 6, 2024
Copy link
Contributor

github-actions bot commented Sep 6, 2024

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

Copy link
Contributor

github-actions bot commented Oct 5, 2024

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

@github-actions github-actions bot added the SME stale The request for an SME has staled label Oct 5, 2024
@nguyenalex836 nguyenalex836 added help wanted Anyone is welcome to open a pull request to fix this issue SME reviewed An SME has reviewed this issue/PR and removed SME stale The request for an SME has staled waiting for review Issue/PR is waiting for a writer's review needs SME This proposal needs review from a subject matter expert labels Oct 7, 2024
@nguyenalex836
Copy link
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
Labels
content This issue or pull request belongs to the Docs Content team help wanted Anyone is welcome to open a pull request to fix this issue pull requests Content related to pull requests SME reviewed An SME has reviewed this issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants