]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
♻️ Update FastAPI People GitHub Action to send the PR as github-actions (#2201)
authorSebastián Ramírez <tiangolo@gmail.com>
Sun, 18 Oct 2020 20:16:12 +0000 (22:16 +0200)
committerGitHub <noreply@github.com>
Sun, 18 Oct 2020 20:16:12 +0000 (22:16 +0200)
.github/actions/people/action.yml
.github/actions/people/app/main.py
.github/workflows/people.yml

index f435c39e13f9d066bd7526040984b066e3139b3b..16bc8cdcb8d7b6652e0ce62b058d1d4dcbe8d392 100644 (file)
@@ -3,7 +3,10 @@ description: "Generate the data for the FastAPI People page"
 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'
index 5ede3f117b0f65c4d0a1ebc62bd5fa15a7526dd4..a4d3af1fd876aa79f106392c989f95cf8be92286 100644 (file)
@@ -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
index bf253e3698c967dbf1bcda01f6082fbf9045f513..0d226a745d031f9c97460c5b1d25fed6ca9bbd5c 100644 (file)
@@ -13,3 +13,4 @@ jobs:
       - uses: ./.github/actions/people
         with:
           token: ${{ secrets.ACTIONS_TOKEN }}
+          standard_token: ${{ secrets.GITHUB_TOKEN }}