diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml index b527226bfc8ce26d0eb3ff349e97b94027a64f0c..df0bbd515b50d73466df76387a8e77e464577aa6 100644 --- a/.github/workflows/issue.yml +++ b/.github/workflows/issue.yml @@ -16,5 +16,8 @@ jobs: uses: actions/checkout@v2 - run: npm install - run: ls "${{ github.workspace }}" - - run: "${{ github.workspace }}/action.js" + - name: Main work + env: + GITHUB_TOKEN: ${{ github.token }} + run: "${{ github.workspace }}/action.js" - run: echo "job.status ${{ job.status }}." diff --git a/action.js b/action.js index df0f14d5ff0a2d6dfb84a9290442d10575001eb6..3d524f89c588dbb87abe89ee9be32924c0e7d0cc 100755 --- a/action.js +++ b/action.js @@ -57,12 +57,12 @@ for (const image of images) { console.log(github.context); //const token = core.getInput("token"); -const pull_request_number = 237; +const pull_request_number = ; const octokit = new github.getOctokit(process.env.GITHUB_TOKEN); const new_comment = octokit.issues.createComment({ owner: 'cirosantilli', - repo: 'china-dictatorship', - issue_number: pull_request_number, + repo: context.payload.repository.name, + issue_number: context.payload.pull_request.number, body: 'asdf' });