author: "Sebastián Ramírez <tiangolo@gmail.com>"
inputs:
token:
- description: 'Token for the repo. Can be passed in using {{ secrets.GITHUB_TOKEN }}'
+ description: 'User token, to read the GitHub API. Can be passed in using {{ secrets.ACTION_TOKEN }}'
+ required: true
+ standard_token:
+ description: 'Default GitHub Action token, used for the PR. Can be passed in using {{ secrets.GITHUB_TOKEN }}'
required: true
runs:
using: 'docker'
class Settings(BaseSettings):
input_token: SecretStr
+ input_standard_token: SecretStr
github_repository: str
logging.basicConfig(level=logging.INFO)
settings = Settings()
logging.info(f"Using config: {settings.json()}")
- g = Github(settings.input_token.get_secret_value())
+ g = Github(settings.input_standard_token.get_secret_value())
repo = g.get_repo(settings.github_repository)
issue_commentors, issue_last_month_commentors, issue_authors = get_experts(
settings=settings