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

Method rebaseBranch

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

Source from the content-addressed store, hash-verified

1176 }
1177
1178 async rebaseBranch(branch: string) {
1179 try {
1180 // Get the diff between the default branch the published branch
1181 const { base_commit: baseCommit, commits } = await this.getDifferences(
1182 this.branch,
1183 await this.getHeadReference(branch),
1184 );
1185 // Rebase the branch based on the diff
1186 const rebasedHead = await this.rebaseCommits(baseCommit, commits);
1187 return rebasedHead;
1188 } catch (error) {
1189 console.error(error);
1190 throw error;
1191 }
1192 }
1193
1194 async setPullRequestStatus(pullRequest: GitHubPull, newStatus: string) {
1195 const labels = [

Callers 1

editorialWorkflowGitMethod · 0.95

Calls 3

getDifferencesMethod · 0.95
getHeadReferenceMethod · 0.95
rebaseCommitsMethod · 0.95

Tested by

no test coverage detected