Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion github-actions/create-pr-for-changes/lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ async function cleanUpObsoleteBranches(

// Delete the obsolete branches.
for (const branchName of obsoleteBranches) {
git.run(['push', getRepositoryGitUrl(forkRepo, git.githubToken), `:refs/heads/${branchName}`]);
git.run(['push', '-d', getRepositoryGitUrl(forkRepo, git.githubToken), branchName]);
}

core.info(`Deleted ${obsoleteBranches.length} obsolete branches.`);
Expand Down
2 changes: 1 addition & 1 deletion github-actions/create-pr-for-changes/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17509,7 +17509,7 @@ async function cleanUpObsoleteBranches(git, repo, forkRepo, branchPrefix) {
const obsoleteBranches = await Promise.all(obsoletePrs.map((pr) => getBranchNameForPr(git, repo, pr.number)));
core.info(`Found ${obsoleteBranches.length} obsolete branches that will be deleted: ` + (obsoleteBranches.length === 0 ? "-" : obsoleteBranches.join(", ")));
for (const branchName of obsoleteBranches) {
git.run(["push", getRepositoryGitUrl(forkRepo, git.githubToken), `:refs/heads/${branchName}`]);
git.run(["push", "-d", getRepositoryGitUrl(forkRepo, git.githubToken), branchName]);
}
core.info(`Deleted ${obsoleteBranches.length} obsolete branches.`);
}
Expand Down