From 1a49f5954551b91e7e3833c74d7be26e4f65406f Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 8 Jan 2020 14:30:42 -0500 Subject: [PATCH] Handle deprecation of `number` param in Octokit --- README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 71413a9..afd990d 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,12 @@ jobs: with: github-token: ${{secrets.GITHUB_TOKEN}} script: | - github.issues.createComment({...context.issue, body: '👋 Thanks for reporting!'}) + github.issues.createComment({ + issue_number: context.issue, + owner: context.owner, + repo: context.repo, + body: '👋 Thanks for reporting!' + }) ``` ### Apply a label to an issue @@ -54,7 +59,12 @@ jobs: with: github-token: ${{secrets.GITHUB_TOKEN}} script: | - github.issues.addLabels({...context.issue, labels: ['Triage']}) + github.issues.addLabels({ + issue_number: context.issue, + owner: context.owner, + repo: context.repo, + labels: ['Triage'] + }) ``` ### Welcome a first-time contributor @@ -90,7 +100,12 @@ jobs: } } - await github.issues.createComment({...context.issue, body: 'Welcome, new contributor!'}) + await github.issues.createComment({ + issue_number: context.issue, + owner: context.owner, + repo: context.repo, + body: 'Welcome, new contributor!' + }) ``` ### Download data from a URL