From e7ca4de17182344cd136019eff969bf86907f084 Mon Sep 17 00:00:00 2001 From: Ciro Santilli <ciro.santilli@gmail.com> Date: Fri, 16 Apr 2021 10:00:09 +0000 Subject: [PATCH] bak --- .github/workflows/issue.yml | 5 ++++- action.js | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml index b527226..df0bbd5 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 df0f14d..3d524f8 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' }); -- GitLab