forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
batches: fix publishing changesets to forks (sourcegraph#43214)
Fixes the way we procure a clone URL for a repo when pushing commits and publishing changesets to a fork
- Loading branch information
1 parent
558139b
commit 839d85b
Showing
17 changed files
with
302 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -381,39 +381,64 @@ export const visibleChangesetApplyPreviewNodeStories = ( | |
}, | ||
}, | ||
}, | ||
'Close changeset': { | ||
'Change diff': { | ||
__typename: 'VisibleChangesetApplyPreview', | ||
operations: [ChangesetSpecOperation.CLOSE, ChangesetSpecOperation.DETACH], | ||
operations: [ChangesetSpecOperation.UPDATE], | ||
delta: { | ||
titleChanged: false, | ||
baseRefChanged: false, | ||
diffChanged: false, | ||
diffChanged: true, | ||
bodyChanged: false, | ||
authorEmailChanged: false, | ||
authorNameChanged: false, | ||
commitMessageChanged: false, | ||
}, | ||
targets: { | ||
__typename: 'VisibleApplyPreviewTargetsDetach', | ||
__typename: 'VisibleApplyPreviewTargetsUpdate', | ||
changesetSpec: baseChangesetSpec(9, publicationStateSet ? true : null), | ||
changeset: { | ||
id: '123123', | ||
title: 'Le open changeset', | ||
title: 'Change diff', | ||
state: ChangesetState.OPEN, | ||
repository: testRepo, | ||
externalID: '123', | ||
externalURL: { | ||
url: 'https://test.test/123', | ||
}, | ||
diffStat: { | ||
added: 10, | ||
deleted: 18, | ||
currentSpec: { | ||
description: { | ||
__typename: 'GitBranchChangesetDescription', | ||
baseRef: 'master', | ||
body: 'body', | ||
commits: [ | ||
{ | ||
subject: 'Abc', | ||
body: null, | ||
author: { | ||
avatarURL: null, | ||
displayName: 'alice', | ||
email: '[email protected]', | ||
user: null, | ||
}, | ||
}, | ||
], | ||
title: 'Title', | ||
}, | ||
}, | ||
author: { | ||
displayName: 'Alice', | ||
email: '[email protected]', | ||
user: { | ||
displayName: 'Alice', | ||
url: '/users/alice', | ||
username: 'alice', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
'Detach changeset': { | ||
'Close changeset': { | ||
__typename: 'VisibleChangesetApplyPreview', | ||
operations: [ChangesetSpecOperation.DETACH], | ||
operations: [ChangesetSpecOperation.CLOSE, ChangesetSpecOperation.DETACH], | ||
delta: { | ||
titleChanged: false, | ||
baseRefChanged: false, | ||
|
@@ -441,76 +466,51 @@ export const visibleChangesetApplyPreviewNodeStories = ( | |
}, | ||
}, | ||
}, | ||
'Change base ref': { | ||
'Detach changeset': { | ||
__typename: 'VisibleChangesetApplyPreview', | ||
operations: [ChangesetSpecOperation.UPDATE], | ||
operations: [ChangesetSpecOperation.DETACH], | ||
delta: { | ||
titleChanged: false, | ||
baseRefChanged: true, | ||
baseRefChanged: false, | ||
diffChanged: false, | ||
bodyChanged: false, | ||
authorEmailChanged: false, | ||
authorNameChanged: false, | ||
commitMessageChanged: false, | ||
}, | ||
targets: { | ||
__typename: 'VisibleApplyPreviewTargetsUpdate', | ||
changesetSpec: baseChangesetSpec(8, publicationStateSet ? true : null), | ||
__typename: 'VisibleApplyPreviewTargetsDetach', | ||
changeset: { | ||
id: '123123', | ||
title: 'Change base ref', | ||
title: 'Le open changeset', | ||
state: ChangesetState.OPEN, | ||
repository: testRepo, | ||
externalID: '123', | ||
externalURL: { | ||
url: 'https://test.test/123', | ||
}, | ||
currentSpec: { | ||
description: { | ||
__typename: 'GitBranchChangesetDescription', | ||
baseRef: 'main', | ||
body: 'body', | ||
commits: [ | ||
{ | ||
subject: 'Abc', | ||
body: null, | ||
author: { | ||
avatarURL: null, | ||
displayName: 'alice', | ||
email: '[email protected]', | ||
user: null, | ||
}, | ||
}, | ||
], | ||
title: 'Title', | ||
}, | ||
}, | ||
author: { | ||
displayName: 'Alice', | ||
email: '[email protected]', | ||
user: { | ||
displayName: 'Alice', | ||
url: '/users/alice', | ||
username: 'alice', | ||
}, | ||
diffStat: { | ||
added: 10, | ||
deleted: 18, | ||
}, | ||
}, | ||
}, | ||
}, | ||
'Change diff': { | ||
'Change base ref': { | ||
__typename: 'VisibleChangesetApplyPreview', | ||
operations: [ChangesetSpecOperation.UPDATE], | ||
delta: { | ||
titleChanged: false, | ||
baseRefChanged: false, | ||
diffChanged: true, | ||
baseRefChanged: true, | ||
diffChanged: false, | ||
bodyChanged: false, | ||
authorEmailChanged: false, | ||
authorNameChanged: false, | ||
commitMessageChanged: false, | ||
}, | ||
targets: { | ||
__typename: 'VisibleApplyPreviewTargetsUpdate', | ||
changesetSpec: baseChangesetSpec(9, publicationStateSet ? true : null), | ||
changesetSpec: baseChangesetSpec(8, publicationStateSet ? true : null), | ||
changeset: { | ||
id: '123123', | ||
title: 'Change base ref', | ||
|
@@ -522,7 +522,7 @@ export const visibleChangesetApplyPreviewNodeStories = ( | |
currentSpec: { | ||
description: { | ||
__typename: 'GitBranchChangesetDescription', | ||
baseRef: 'master', | ||
baseRef: 'main', | ||
body: 'body', | ||
commits: [ | ||
{ | ||
|
@@ -676,7 +676,7 @@ export const visibleChangesetApplyPreviewNodeStories = ( | |
targets: { | ||
__typename: 'VisibleApplyPreviewTargetsAttach', | ||
changesetSpec: baseChangesetSpec(12, publicationStateSet ? true : null, { | ||
forkTarget: { pushUser: true, namespace: null }, | ||
forkTarget: { pushUser: true, namespace: '<user>' }, | ||
description: { | ||
__typename: 'GitBranchChangesetDescription', | ||
baseRepository: testRepo, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.