Skip to content

Commit 0ea6575

Browse files
author
Audrey Lorberfeld
committed
Add docs for pushed-only changesets
1 parent 8cde82e commit 0ea6575

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

docs/batch-changes/bulk-operations-on-changesets.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Below is a list of supported bulk operations for changesets and the conditions w
3636
| **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 |
3737
| **Close** | Close the selected changesets on the code hosts |
3838
| **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 |
39+
| **Push-only** | Pushes code changes to a new branch on a code host without making a merge request. Available on GitHub and GitLab only. |
3940
| **Export** | Export selected changesets that you can use for later use |
4041
| **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) |
4142

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
**Pushing code to a code host (GitHub/GitLab only)**
2+
3+
<p className="subtitle">Learn how to push code changes to a code host without making a merge request.</p>
4+
5+
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.
6+
7+
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:
8+
9+
[image would go here]
10+
11+
12+
## Notes
13+
- With pushed-only changesets, you are still able see CI feedback, as long as it triggers on code pushes.
14+
- The `review` status of a pushed-only changeset is always "N/A."
15+
- The `status` of a pushed-only changeset is always "OPEN."
16+
- To publish a pushed-only changeset, simply select the changeset in the Batch Changes UI and select 'Publish.'
17+
18+
19+
## Requirements
20+
To push code to a new branch on a code host, you will need:
21+
22+
- [Admin permissions for the batch change](/batch-changes/permissions-in-batch-changes#permission-levels-for-batch-changes)
23+
- Write access to the changeset's repository on the code host
24+
- 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
25+
26+
<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>

docs/batch-changes/quickstart.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@ The batch change's **changesets** still need to be published, which means they e
100100

101101
## Publish a changeset
102102

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

105-
Publishing causes commits, branches, and pull/merge requests to be written to your code host.
105+
- **Publishing** a changeset results in the creation of a merge request on your code host (e.g. a Pull Request on GitHub).
106+
107+
- **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.
108+
- Read more about push-only changesets under the Bulk Operations heading.
106109

107110
### Configure code host credentials
108111

src/data/navigation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ export const navigation: NavigationItem[] = [
152152
title: "Bulk Operations", href: "/batch-changes/bulk-operations-on-changesets",
153153
subsections: [
154154
{ title: "Publishing Changesets", href: "/batch-changes/publishing-changesets", },
155+
{ title: "Pushing Code", href: "/batch-changes/push-only-changesets", },
155156
{ title: "Tracking Changesets", href: "/batch-changes/tracking-existing-changesets", },
156157
{ title: "Rebasing Changesets", href: "/batch-changes/rebasing-changesets", },
158+
157159
]
158160
},
159161
{

0 commit comments

Comments
 (0)