How to accept an external contribution

This page outlines how to accept a contribution to the Sourcegraph repository from someone outside the Sourcegraph team.

CLA-bot

  1. Check if a contributor signed the CLA here. All fields should be filled with valid data to proceed with the pull request.
  2. If the CLA is signed — update the CLA-bot configuration here by adding a contributor name to the contributors field, preserving the alphabetical order.
  3. Comment on the pull request: @cla-bot check.
  4. The verification/cla-signed workflow should become green. 🎉

Buildkite

To request a Buildkite build for a pull request from a fork, a build must be manually requested after reviewing the contributor’s changes. A successful Buildkite build is required for a pull request to be merged.

Request a build directly

Once changes have been reviewed, a build can be requested directly for a commit with the sg CLI:

sg ci build --commit $COMMIT

Check out and request a build

To check out a pull request’s code locally, use the gh CLI:

gh pr checkout $NUMBER

Alternatively, it is also possible to check out the branch without having to re-clone the forked repo by running the following - make sure that the created branch name exactly matches their branch name, otherwise Buildkite will not match the created build to their branch:

git fetch [email protected]:$THEIR_USERNAME/sourcegraph $THEIR_BRANCH:$THEIR_BRANCH

Then, use the sg CLI to request a build after reviewing the code:

sg ci build