diff --git a/docs/batch-changes/bulk-operations-on-changesets.mdx b/docs/batch-changes/bulk-operations-on-changesets.mdx index 36f623072..736cb27f6 100644 --- a/docs/batch-changes/bulk-operations-on-changesets.mdx +++ b/docs/batch-changes/bulk-operations-on-changesets.mdx @@ -36,6 +36,7 @@ Below is a list of supported bulk operations for changesets and the conditions w | **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 | | **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. | | **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) | | **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. | diff --git a/docs/batch-changes/push-only-changesets.mdx b/docs/batch-changes/push-only-changesets.mdx new file mode 100644 index 000000000..3a1953c19 --- /dev/null +++ b/docs/batch-changes/push-only-changesets.mdx @@ -0,0 +1,30 @@ +# Pushing code to a code host + +

Learn how to push code changes to a code host without making a merge request.

+ +Pushed-only changesets work on GitHub and GitLab only. They do not yet work with forked repositories. + +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. + + 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: + +![push-only-dropdown](https://storage.googleapis.com/sourcegraph-assets/Docs/push-only-dropdown-0625.png) + +## Few important considerations + +- 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** + +![push-only-changesets-executed](https://storage.googleapis.com/sourcegraph-assets/Docs/push-only-executed-0625.png) + +## 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) +- Write access to the changeset's repository on the code host +- [Credentials](/batch-changes/configuring-credentials) configured for the code host + +For more information, see [Code host interactions in Batch Changes](/batch-changes/permissions-in-batch-changes#code-host-interactions-in-batch-changes). diff --git a/docs/batch-changes/quickstart.mdx b/docs/batch-changes/quickstart.mdx index 27c2b5cba..0f273555f 100644 --- a/docs/batch-changes/quickstart.mdx +++ b/docs/batch-changes/quickstart.mdx @@ -100,9 +100,10 @@ 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](/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). +- **[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. ### Configure code host credentials diff --git a/src/data/navigation.ts b/src/data/navigation.ts index f89e1c771..2195632dd 100644 --- a/src/data/navigation.ts +++ b/src/data/navigation.ts @@ -152,8 +152,10 @@ export const navigation: NavigationItem[] = [ title: "Bulk Operations", href: "/batch-changes/bulk-operations-on-changesets", subsections: [ { title: "Publishing Changesets", href: "/batch-changes/publishing-changesets", }, + { title: "Pushing Code", href: "/batch-changes/push-only-changesets", }, { title: "Tracking Changesets", href: "/batch-changes/tracking-existing-changesets", }, { title: "Rebasing Changesets", href: "/batch-changes/rebasing-changesets", }, + ] }, { @@ -164,7 +166,7 @@ export const navigation: NavigationItem[] = [ }, { title: "Access Permissions", href: "/batch-changes/permissions-in-batch-changes" }, { - title: "Changesets in Monorepo", href: "/batch-changes/creating-changesets-per-project-in-monorepos", + title: "Changesets in Monorepos", href: "/batch-changes/creating-changesets-per-project-in-monorepos", subsections: [ { title: "Changesets in Large Repos", href: "/batch-changes/creating-multiple-changesets-in-large-repositories", }, ] @@ -187,7 +189,7 @@ export const navigation: NavigationItem[] = [ ] }, { - title: "Working with CLI", href: "/batch-changes/how-src-executes-a-batch-spec", + title: "Working with the CLI", href: "/batch-changes/how-src-executes-a-batch-spec", subsections: [ { title: "Re-executing Batch Specs", href: "/batch-changes/reexecuting-batch-specs-multiple-times", }, { title: "CLI Subcommands", href: "/cli/references/batch", },