Skip to content
1 change: 1 addition & 0 deletions docs/batch-changes/bulk-operations-on-changesets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Below is a list of supported bulk operations for changesets and the conditions w
| **Merge (experimental)** | Merge the selected changesets on code hosts. Some changesets may be unmergeable due to their states, which does not impact the overall bulk operation. Failed merges are listed under the bulk operations tab. In the confirmation modal, you can opt for a squash merge strategy, available on GitHub, GitLab, and Bitbucket Cloud. For Bitbucket Server/Data Center, only regular merges are performed |
| **Close** | Close the selected changesets on the code hosts |
| **Publish** | Publishes the selected changesets, provided they don't have a [`published` field](/batch-changes/batch-spec-yaml-reference#changesettemplatepublished) in the batch spec. You can choose between draft and normal changesets in the confirmation modal |
| **Push-only** | Pushes code changes to a new branch on a code host without making a merge request. Available on GitHub and GitLab only. |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the bulk operation is called "push" only (verb is active), whereas the non-bulk-op (not documented in this PR) and the reference to the state of the changeset is "pushED" only (e.g. "Look at this pushed-only changeset I made").

| **Export** | Export selected changesets that you can use for later use |
| **Re-execute** | Users can re-execute individual changeset creation logic for selected workspaces. This allows for creating new changesets for users who are using non-deterministic run steps (for example,LLMs) |

Expand Down
26 changes: 26 additions & 0 deletions docs/batch-changes/push-only-changesets.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
**Pushing code to a code host (GitHub/GitLab only)**

<p className="subtitle">Learn how to push code changes to a code host without making a merge request.</p>

After you've [created a batch change](/batch-changes/create-a-batch-change), you will be redirected to a page displaying a list of the changesets the Batch Change created. From this page, you can apply any bulk operation to 1+ changesets.

To push code to a new branch on a code host without also creating a merge request, simply select 'push only' from the dropdown menu:

[image would go here]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting on Entitle access to upload pic



## Notes
- With pushed-only changesets, you are still able see CI feedback, as long as it triggers on code pushes.
- The `review` status of a pushed-only changeset is always "N/A."
- The `status` of a pushed-only changeset is always "OPEN."
- To publish a pushed-only changeset, simply select the changeset in the Batch Changes UI and select 'Publish.'


## Requirements
To push code to a new branch on a code host, you will need:

- [Admin permissions for the batch change](/batch-changes/permissions-in-batch-changes#permission-levels-for-batch-changes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this on Sourcegraph's or GitHub's side?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see write access to the code host mentioned below. Does it make sense to call it site-admin here?

- Write access to the changeset's repository on the code host
- A [personal access token](/batch-changes/configuring-credentials#personal-access-tokens) or a [global service account token](/batch-changes/configuring-credentials#global-service-account-tokens) configured for the code host

<Callout type="note">For more information, see [Code host interactions in Batch Changes](/batch-changes/permissions-in-batch-changes#code-host-interactions-in-batch-changes).</Callout>
7 changes: 5 additions & 2 deletions docs/batch-changes/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,12 @@ The batch change's **changesets** still need to be published, which means they e

## Publish a changeset

So far, nothing has been created on your code hosts. To do so, you must tell Sourcegraph to **publish a changeset**.
So far, nothing has been created on your code hosts. To do so, you can tell Sourcegraph to either **publish** or **push** a changeset.

Publishing causes commits, branches, and pull/merge requests to be written to your code host.
- **Publishing** a changeset results in the creation of a merge request on your code host (e.g. a Pull Request on GitHub).

- **Pushing** a changeset (available on GitHub and GitLab only) results in pushing your code changes to a new branch on your code host _without_ also creating a merge request. You are able to see any CI feedback set to trigger upon code-pushes in the Batch Changs UI.
- Read more about push-only changesets under the Bulk Operations heading.

### Configure code host credentials

Expand Down
Loading