From: Sebastián Ramírez Date: Sun, 18 Oct 2020 20:16:12 +0000 (+0200) Subject: ♻️ Update FastAPI People GitHub Action to send the PR as github-actions (#2201) X-Git-Tag: 0.61.2~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d625963cc5cbe3980f0f3dfe71af3d8d6fb960a4;p=thirdparty%2Ffastapi%2Ffastapi.git ♻️ Update FastAPI People GitHub Action to send the PR as github-actions (#2201) --- diff --git a/.github/actions/people/action.yml b/.github/actions/people/action.yml index f435c39e13..16bc8cdcb8 100644 --- a/.github/actions/people/action.yml +++ b/.github/actions/people/action.yml @@ -3,7 +3,10 @@ description: "Generate the data for the FastAPI People page" author: "Sebastián Ramírez " 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' diff --git a/.github/actions/people/app/main.py b/.github/actions/people/app/main.py index 5ede3f117b..a4d3af1fd8 100644 --- a/.github/actions/people/app/main.py +++ b/.github/actions/people/app/main.py @@ -258,6 +258,7 @@ class SponsorsResponse(BaseModel): class Settings(BaseSettings): input_token: SecretStr + input_standard_token: SecretStr github_repository: str @@ -418,7 +419,7 @@ if __name__ == "__main__": 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 diff --git a/.github/workflows/people.yml b/.github/workflows/people.yml index bf253e3698..0d226a745d 100644 --- a/.github/workflows/people.yml +++ b/.github/workflows/people.yml @@ -13,3 +13,4 @@ jobs: - uses: ./.github/actions/people with: token: ${{ secrets.ACTIONS_TOKEN }} + standard_token: ${{ secrets.GITHUB_TOKEN }}