Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return the result. Screw the const. #85

Merged
merged 2 commits into from
Jan 23, 2025
Merged
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
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;
Loading