Skip to content

Commit ce48a69

Browse files
aulorbebahrmichaelMaedahBatool
authored
feat(batches): add docs for pushed-only changesets (#1200)
This PR adds docs for the push-only bulk operation. Closes [EPD2-10](https://linear.app/sourcegraph/issue/EPD2-10/m3-write-documentation-in-preparation-of-65-release). ## Pull Request approval --------- Co-authored-by: Michael Bahr <[email protected]> Co-authored-by: Maedah Batool <[email protected]>
1 parent a1f27b3 commit ce48a69

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-4
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** | 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
| **Enable auto-merge for GitHub (experimental)** | Enable auto-merge on selected GitHub changesets. When enabled, changesets will be automatically merged once all required status checks pass and any blocking reviews are resolved. This feature is GitHub-specific and requires [appropriate setup](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) on the target repositories. Failed actions are listed under the bulk operations tab. |
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Pushing code to a code host
2+
3+
<p className="subtitle">Learn how to push code changes to a code host without making a merge request.</p>
4+
5+
<Callout type="note">Pushed-only changesets work on GitHub and GitLab only. They do not yet work with forked repositories.</Callout>
6+
7+
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 more than one changesets.
8+
9+
To push code to a new branch on a code host without also creating a merge request, simply select **Push to code host only** from the dropdown menu:
10+
11+
![push-only-dropdown](https://storage.googleapis.com/sourcegraph-assets/Docs/push-only-dropdown-0625.png)
12+
13+
## Few important considerations
14+
15+
- With pushed-only changesets, you are still able see CI feedback, as long as it triggers on code pushes
16+
- The `review` status of a pushed-only changeset is always "N/A"
17+
- The `status` of a pushed-only changeset is always "Open"
18+
- To publish a pushed-only changeset, simply select the changeset in the Batch Changes UI and select **Publish**
19+
20+
![push-only-changesets-executed](https://storage.googleapis.com/sourcegraph-assets/Docs/push-only-executed-0625.png)
21+
22+
## Requirements
23+
24+
To push code to a new branch on a code host, you will need:
25+
26+
- [Admin permissions for the batch change](/batch-changes/permissions-in-batch-changes#permission-levels-for-batch-changes)
27+
- Write access to the changeset's repository on the code host
28+
- [Credentials](/batch-changes/configuring-credentials) configured for the code host
29+
30+
<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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ 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](/batch-changes/publishing-changesets)** a changeset results in the creation of a merge request on your code host (e.g. a Pull Request on GitHub).
106+
- **[Pushing](/batch-changes/push-only-changesets)** 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.
106107

107108
### Configure code host credentials
108109

src/data/navigation.ts

Lines changed: 4 additions & 2 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
{
@@ -164,7 +166,7 @@ export const navigation: NavigationItem[] = [
164166
},
165167
{ title: "Access Permissions", href: "/batch-changes/permissions-in-batch-changes" },
166168
{
167-
title: "Changesets in Monorepo", href: "/batch-changes/creating-changesets-per-project-in-monorepos",
169+
title: "Changesets in Monorepos", href: "/batch-changes/creating-changesets-per-project-in-monorepos",
168170
subsections: [
169171
{ title: "Changesets in Large Repos", href: "/batch-changes/creating-multiple-changesets-in-large-repositories", },
170172
]
@@ -187,7 +189,7 @@ export const navigation: NavigationItem[] = [
187189
]
188190
},
189191
{
190-
title: "Working with CLI", href: "/batch-changes/how-src-executes-a-batch-spec",
192+
title: "Working with the CLI", href: "/batch-changes/how-src-executes-a-batch-spec",
191193
subsections: [
192194
{ title: "Re-executing Batch Specs", href: "/batch-changes/reexecuting-batch-specs-multiple-times", },
193195
{ title: "CLI Subcommands", href: "/cli/references/batch", },

0 commit comments

Comments
 (0)