Skip to content

Commit 9465868

Browse files
Copilotalexr00
andcommitted
Add 4px top margin to edit button and include base branch in reply
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 0a485e6 commit 9465868

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/github/pullRequestOverview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel<PullRequestMode
830830
if (selectedBranch) {
831831
try {
832832
await this._item.updateBaseBranch(selectedBranch);
833-
await this._replyMessage(message, {});
833+
await this._replyMessage(message, { base: selectedBranch });
834834
} catch (e) {
835835
Logger.error(formatError(e), PullRequestOverviewPanel.ID);
836836
vscode.window.showErrorMessage(vscode.l10n.t('Changing base branch failed. {0}', formatError(e)));

webviews/common/context.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ export class PRContext {
9292
public readyForReviewAndMerge = (args: { mergeMethod: MergeMethod }): Promise<ReadyForReview> => this.postMessage({ command: 'pr.readyForReviewAndMerge', args });
9393

9494
public addReviewers = () => this.postMessage({ command: 'pr.change-reviewers' });
95-
public changeBaseBranch = () => this.postMessage({ command: 'pr.change-base-branch' });
95+
public changeBaseBranch = async () => {
96+
const result = await this.postMessage({ command: 'pr.change-base-branch' });
97+
if (result?.base) {
98+
this.updatePR({ base: result.base });
99+
}
100+
};
96101
public changeProjects = (): Promise<ProjectItemsReply> => this.postMessage({ command: 'pr.change-projects' });
97102
public removeProject = (project: IProjectItem) => this.postMessage({ command: 'pr.remove-project', args: project });
98103
public addMilestone = () => this.postMessage({ command: 'pr.add-milestone' });

webviews/editorWebview/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,10 @@ body button .icon {
541541
border-radius: 4px;
542542
}
543543

544+
.merge-branches .icon-button {
545+
margin-top: 4px;
546+
}
547+
544548
.subtitle .created-at {
545549
margin-left: auto;
546550
white-space: nowrap;

0 commit comments

Comments
 (0)