diff --git a/.github/workflows/update-trending-base.yml b/.github/workflows/update-trending-base.yml index 5f050a7..9788b33 100644 --- a/.github/workflows/update-trending-base.yml +++ b/.github/workflows/update-trending-base.yml @@ -2,6 +2,10 @@ name: Update epic trending field on: workflow_call: + secrets: + GITHUB_TOKEN: + description: GitHub Token + required: true inputs: project_owner: description: GitHub Project Owner @@ -15,10 +19,6 @@ on: description: GitHub Project Field Name type: string default: 'Trending' - github_token: - description: GitHub Token - type: string - required: true jobs: extract-trend: @@ -39,7 +39,7 @@ jobs: uses: actions/github-script@v7 if: ${{ steps.extract-trend.outputs.group1 != '' }} with: - github-token: ${{ inputs.github_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | const variables = { trend: `${{ steps.extract-trend.outputs.group1 }}`.trim(), @@ -93,7 +93,7 @@ jobs: uses: monry/actions-get-project-id@v2 with: # Personal Access Token that with `org:read` are granted. - github-token: ${{ inputs.github_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} # Owner name of project project-owner: ${{ inputs.project_owner }} @@ -108,13 +108,13 @@ jobs: uses: monry/actions-get-project-item-id@v2 with: # Personal Access Token that with `repo` and `org:read` are granted. - github-token: ${{ inputs.github_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} project-id: ${{ steps.get-project-id.outputs.project-id }} issue-id: ${{ github.event.issue.node_id }} - uses: titoportas/update-project-fields@v0.1.0 with: project-url: https://github.com/orgs/grafana/projects/${{ inputs.project_number }} - github-token: ${{ inputs.github_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} item-id: ${{ steps.get-item-id.outputs.project-item-id }} field-keys: Trending field-values: ${{ needs.extract-trend.outputs.trend_id }}