Skip to content

Commit 7a6c107

Browse files
committed
fix: ensure updated plugins YAML content is set correctly when PR branch does not exist
Signed-off-by: David Festal <dfestal@redhat.com>
1 parent fb5b942 commit 7a6c107

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

update-overlay/create-pr-if-necessary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Workspace reference should be manually set to commit ${workspaceCommit}.`,
283283
const needsUpdateMessage = workspaceCheck.status === 'sourceNeedsUpdate' ? 'Update' : 'Add';
284284
const message = `${needsUpdateMessage} \`${workspaceName}\` workspace to commit \`${workspaceCommit.substring(0,7)}\` for backstage \`${backstageVersion}\` on branch \`${overlayRepoBranchName}\``
285285

286-
const updatedPluginsYamlContent = prBranchExists ? prContentCheck?.pluginsYamlContent : workspaceCheck.pluginsYamlContent;
286+
const updatedPluginsYamlContent = prBranchExists ? prContentCheck?.pluginsYamlContent : (workspaceCheck.pluginsYamlContent ?? newPluginsYamlContent);
287287
core.info(`Getting latest commit sha and treeSha of the target branch`);
288288
const response = await githubClient.repos.listCommits({
289289
owner: overlayRepoOwner,

0 commit comments

Comments
 (0)