Pull requests
Open GitHub pull requests and GitLab merge requests from task branches, on github.com, gitlab.com, GitHub Enterprise and self-managed GitLab.
With git.policy: PULL_REQUEST, the worker commits the task's changes on its branch, pushes it, and opens a pull
request (GitHub) or merge request (GitLab) into the branch the task started from.
How the worker opens it
- With a token for the host (worker UI → Settings → Git hosting): the worker reads the host and repository from
the
originURL (https, ssh orgit@host:owner/repo) and uses GitHub's or GitLab's REST API. github.com and gitlab.com need only the token; for GitHub Enterprise or self-managed GitLab, also give the API URL. - Otherwise the GitHub CLI is used (
gh pr create), if it is installed and signed in as the worker user.
When it cannot be opened
If there is no token or gh, or the host refuses (for example because one already exists), the commit and push still
stand and the reason is in the task's Git result.
Verification status
Pull and merge requests through the REST API were tested against fakes of GitHub and GitLab and a real bare remote,
not yet github.com or gitlab.com. The gh fallback has not been run.