Skip to content

Commit

Permalink
Return the result. Screw the const.
Browse files Browse the repository at this point in the history
  • Loading branch information
DFINITYManu committed Jan 23, 2025
1 parent 010da4e commit 2b58972
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/update-k8s-deployments/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,20 @@ runs:
owner: owner,
repo: repo,
base: base,
head: head
head: head,
state: 'open'
});
if (pulls.data.length > 0) {
const result = await github.rest.pulls.update({
var result = await github.rest.pulls.update({
owner: owner,
repo: repo,
pull_number: pulls.data[0].number,
body: 'Updating container images to incorporate [these changes](https://github.com/${{ github.repository }}/compare/${{ steps.create-rollout-commit.outputs.previous_ref }}..${{ steps.create-rollout-commit.outputs.current_ref }}).',
});
console.log("Updated pull request " + pulls.data[0].number);
return result;
} else {
const result = await github.rest.pulls.create({
var result = await github.rest.pulls.create({
title: '[nomrbot] - New ${{ inputs.component }} release from ${{ github.repository }}',
owner: owner,
repo: repo,
Expand All @@ -96,5 +99,6 @@ runs:
maintainer_can_modify: true,
body: 'Updating container images to incorporate [these changes](https://github.com/${{ github.repository }}/compare/${{ steps.create-rollout-commit.outputs.previous_ref }}..${{ steps.create-rollout-commit.outputs.current_ref }}).'
});
console.log("Created pull request " + result.number);
return result;
}
return result;

0 comments on commit 2b58972

Please sign in to comment.