Move from GitHub / Sync
Merge on a synced repository
A pull request that is on GitHub merges on GitHub, so the checks, reviews and merge methods of GitHub decide the merge. Merge it from here, and let GitHub close the issues that it fixes.
5 min read
1. Click Merge
On a pull request that is on GitHub, Merge here merges it on GitHub with your token. This is true for a pull request from GitHub, and for one opened here and on GitHub.
- The required checks, reviews and merge methods of GitHub apply.
- Merge when ready and the merge queue wait for its checks from GitHub.
- After the merge, the base branch comes down.
2. If the merge is refused
| Case | What to do |
|---|---|
| GitHub's base branch moved | Sync brings the branch down by itself, and the pull request page updates when it lands. Then merge again. Merge when ready waits and tries again by itself. |
| A pull request from GitHub into a branch that sync does not bring down | It cannot merge here. Its merge button is off before you click it, and the merge box links to the pull request on GitHub. Merge it there. |
| A pull request into a release branch that is only here | Open it on GitHub first, then merge. See Open a pull request on GitHub later. A pull request from a fork cannot open on GitHub, so it cannot merge into a release branch. A private one merges here: see A private pull request. |
Done
The pull request is merged on GitHub, and its base branch came down here. If it merged into the default branch, GitHub closes the issues that it fixes.
Conflicts
A pull request that is on GitHub merges on GitHub, so the forge takes the answer of GitHub about conflicts. It does not check the pull request for conflicts itself.
- The Conflicts badge and the ease of merge in the pull request list show the answer of GitHub. Merge when ready and the merge queue use it too.
- The sync reads the answer with the checks from GitHub.
- After a push to the head branch or a move of the base branch, GitHub checks again. While GitHub checks, the last answer stays.
- After a move of the base branch, the forge asks GitHub again when the ease of merge of the pull request updates. See When the values change.
- The merge box on the page of the pull request shows the answer of GitHub too. That answer has no list of files, so the box says This branch has conflicts and lists no files.
A private pull request
GitHub has no private pull requests, so a private pull request stays here until you merge it. Merge into a release branch then works like a git push to that branch:
- The forge makes the merge in the private companion, so the private commits stay out of the public repository. For a rebase, it puts the commits of the branch on the base there.
- It pushes the merge to GitHub's branch with your GitHub token. The branch rules of GitHub apply to the push.
- After GitHub took it, the branch comes down here, and the pull request shows merged.
If GitHub's branch moved since the last sync, or GitHub refuses the push, the merge is refused with the reason, and nothing changes here or on GitHub. Sync brings a moved branch down by itself in a moment. Then merge again.
You need GitHub connected for sync: see Connect GitHub. Agents cannot merge it.
Pushes and agents
- A
git pushto a release branch goes to GitHub first, with your token. The branch rules of GitHub apply to it. - Agents cannot merge, or push into a release branch.
Issues that a pull request fixes
You link the issues that a pull request fixes as on any repository. See Link the issues a pull request fixes. On a synced repository, GitHub closes them.
How the links get made:
- A closing keyword in a pull request from GitHub links the issue here too:
Fixes #N,Closes #NorResolves #N, in the title or the body. This happens when sync brings in the pull request, and when an edit on GitHub adds a keyword. When the edit removes the keyword, the link stays. - An open pull request with a keyword and no link gets its link one time, automatically. This includes the pull requests of a GitHub import, after the import ends.
- On a pull request that is on GitHub, a new link adds a
Fixes #Nline to its body on GitHub, with your GitHub token. The forge adds a line only for an issue that is on GitHub, and that the body does not name yet. - When you remove a link, the
Fixes #Nline stays in the body. Edit the body to remove it. - Agents cannot change the links of a pull request on GitHub, as for other edits of items from GitHub.
How the issues close:
- GitHub closes those issues when the pull request merges into the default branch. Sync brings the closed state here.
- The forge closes and stages nothing itself, so the release setting has no effect here.