From aeb95b1455d5ca1f5100ef1130b17a8eccfb0c8b Mon Sep 17 00:00:00 2001 From: Kun Jinkao <45487685+Snoopy1866@users.noreply.github.com> Date: Wed, 18 Dec 2024 15:35:45 +0800 Subject: [PATCH] update --- .github/scripts/add-labels.js | 6 +++--- .github/workflows/issue-label.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/add-labels.js b/.github/scripts/add-labels.js index c20e7ac..edd995a 100644 --- a/.github/scripts/add-labels.js +++ b/.github/scripts/add-labels.js @@ -9,9 +9,9 @@ async function main() { const issueTitle = context.payload.issue.title; const issueNumber = context.payload.issue.number; - const token = core.getInput("GITHUB_TOKEN", { required: true }); - console.log("Token: ", token); - const octokit = github.getOctokit(token); + const myToken = core.getInput("myToken"); + console.log("Token: ", myToken); + const octokit = github.getOctokit({ auth: myToken, request: fetch }); const labels = issueTitle .match(/\[([^\[\]]+)\]/g) diff --git a/.github/workflows/issue-label.yml b/.github/workflows/issue-label.yml index e44f400..5bff464 100644 --- a/.github/workflows/issue-label.yml +++ b/.github/workflows/issue-label.yml @@ -27,4 +27,4 @@ jobs: echo ${{ github.event.issue.number}} node .github/scripts/add-labels.js env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + myToken: ${{ secrets.GITHUB_TOKEN }}