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

Method rebaseBranch

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

Source from the content-addressed store, hash-verified

1163 }
1164
1165 async rebaseBranch(branch: string) {
1166 try {
1167 // Get the diff between the default branch the published branch
1168 const { base_commit: baseCommit, commits } = await this.getDifferences(
1169 this.branch,
1170 await this.getHeadReference(branch),
1171 );
1172 // Rebase the branch based on the diff
1173 const rebasedHead = await this.rebaseCommits(baseCommit, commits);
1174 return rebasedHead;
1175 } catch (error) {
1176 console.error(error);
1177 throw error;
1178 }
1179 }
1180
1181 async setPullRequestStatus(pullRequest: GitHubPull, newStatus: string) {
1182 const labels = [

Callers 1

editorialWorkflowGitMethod · 0.95

Calls 3

getDifferencesMethod · 0.95
getHeadReferenceMethod · 0.95
rebaseCommitsMethod · 0.95

Tested by

no test coverage detected