MCPcopy Create free account
hub / github.com/decaporg/decap-cms / rebaseBranch

Method rebaseBranch

packages/decap-cms-backend-github/src/API.ts:1140–1154  ·  view source on GitHub ↗
(branch: string)

Source from the content-addressed store, hash-verified

1138 }
1139
1140 async rebaseBranch(branch: string) {
1141 try {
1142 // Get the diff between the default branch the published branch
1143 const { base_commit: baseCommit, commits } = await this.getDifferences(
1144 this.branch,
1145 await this.getHeadReference(branch),
1146 );
1147 // Rebase the branch based on the diff
1148 const rebasedHead = await this.rebaseCommits(baseCommit, commits);
1149 return rebasedHead;
1150 } catch (error) {
1151 console.error(error);
1152 throw error;
1153 }
1154 }
1155
1156 async setPullRequestStatus(pullRequest: GitHubPull, newStatus: string) {
1157 const labels = [

Callers 1

editorialWorkflowGitMethod · 0.95

Calls 3

getDifferencesMethod · 0.95
getHeadReferenceMethod · 0.95
rebaseCommitsMethod · 0.95

Tested by

no test coverage detected