Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

batches: unify the naming convention of forks created from batch changes for github#44924

Merged
adeola-ak merged 12 commits into
mainfrom
aa/fix-github-forks
Dec 1, 2022
Merged

batches: unify the naming convention of forks created from batch changes for github#44924
adeola-ak merged 12 commits into
mainfrom
aa/fix-github-forks

Conversation

@adeola-ak

Copy link
Copy Markdown
Contributor

closes #44547

As reported in https://github.com/sourcegraph/sourcegraph/issues/41641, when batches.enforceForks is enabled by the user, the creation of forks would fails due to us currently not handling the case of repos that are not forks yet have the same name. This PR is to make all behaivor uniform, as Github would handle forks with incrementing numbers, instead we'll match the behavior previously implemented which creates forks in the following convention:
usernamespace/parentnamespace-reponame

Test plan

manually tested the creation of forks for batch changes when a repo with the same name exists on the codehost as well as testing that when the fork exists, the user can create batch changes with a new branch name.

@adeola-ak adeola-ak added the batch-changes Issues related to Batch Changes label Nov 29, 2022
@cla-bot cla-bot Bot added the cla-signed label Nov 29, 2022
@adeola-ak adeola-ak marked this pull request as ready for review November 30, 2022 06:33
@sourcegraph-bot

sourcegraph-bot commented Nov 30, 2022

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff a5d2797...7c87569.

Notify File(s)
@eseliger enterprise/internal/batches/sources/github.go
enterprise/internal/batches/sources/github_test.go
internal/extsvc/github/v3.go
internal/extsvc/github/v3_test.go
internal/extsvc/github/v4.go
@sourcegraph/delivery doc/admin/config/batch_changes.md

@adeola-ak adeola-ak requested a review from a team November 30, 2022 06:46

@courier-new courier-new left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code changes look good, but if this is the final code host I'd love to see the docs page updated alongside the CHANGELOG entry you added. 😄

Comment thread CHANGELOG.md Outdated
adeola-ak and others added 3 commits December 1, 2022 10:07
@adeola-ak adeola-ak merged commit 13fb885 into main Dec 1, 2022
@adeola-ak adeola-ak deleted the aa/fix-github-forks branch December 1, 2022 15:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

batch-changes Issues related to Batch Changes cla-signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

batches: unify the naming convention of forks created from batch changes for github

4 participants