Skip to content

Commit

Permalink
chore: Upgrade to Github Script v6 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebachle authored Dec 28, 2022
1 parent 0df0b87 commit bfe72b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ runs:
fi
- name: Create/Update Comment
uses: actions/github-script@v4
uses: actions/github-script@v6
env:
TF_WORKSPACE: "${{ steps.workspace.outputs.stdout }}"
CUSTOM_TITLE: "${{ inputs.pr-comment-title }}"
Expand Down Expand Up @@ -139,7 +139,7 @@ runs:
Action: \`${{ github.event_name }}\`
`;
const comments = await github.issues.listComments({
const comments = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -151,22 +151,22 @@ runs:
if (raw_plan.includes("No changes.")) {
if (githubActionsBotComment) {
await github.issues.deleteComment({
await github.rest.issues.deleteComment({
comment_id: githubActionsBotComment.id,
owner: context.repo.owner,
repo: context.repo.repo,
})
}
} else {
if (githubActionsBotComment) {
await github.issues.updateComment({
await github.rest.issues.updateComment({
comment_id: githubActionsBotComment.id,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentContent,
})
} else {
await github.issues.createComment({
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down

0 comments on commit bfe72b3

Please sign in to comment.