maguowei/starred

template: github api request failure in repo generated from awesome-stars

montchr opened this issue · 1 comments

I followed the instructions to "Use awesome-stars as template" but the update repo category by language step in the workflow run resulted in an error:

Run starred --username ${USERNAME} --repository ${REPOSITORY} --sort --token ${GITHUB_TOKEN} --message 'awesome-stars category by language update by github actions cron, created by starred'
  starred --username ${USERNAME} --repository ${REPOSITORY} --sort --token ${GITHUB_TOKEN} --message 'awesome-stars category by language update by github actions cron, created by starred'
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.10.8/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.8/x64/lib
    REPOSITORY_NAME: stars
    GITHUB_TOKEN: ***
    REPOSITORY: stars
    USERNAME: montchr
Error: 403, message='Forbidden', url=URL('https://api.github.com/graphql')

From Automatic token authentication - GitHub Docs:

When you enable GitHub Actions, GitHub installs a GitHub App on your repository. The GITHUB_TOKEN secret is a GitHub App installation access token. You can use the installation access token to authenticate on behalf of the GitHub App installed on your repository. The token's permissions are limited to the repository that contains your workflow.

I'm not seeing the referenced GitHub App in my repo settings, which leads me to wonder if the usual process for setting up actions doesn't happen as it normally would when using the "awesome-stars as template" approach.

Should I have created the token manually? Is something weird going on in the repo generatiion process? Am I overlooking something obvious?

Related to #99, which is caused by this issue.

This only happened once on the first manual run. The workflow has been running fine since.