Your repo reached a stars milestone? Celebrate with a video of your stargazers!
Example
https://user-images.githubusercontent.com/1911623/121809549-93342a80-cc33-11eb-88ff-e45f8b6dace4.mp4?width=200
Authentication
This template displays stargazers’ names and avatars. GitHub restricts access to this data to repository admins and collaborators, including for public repositories.
Set REMOTION_GITHUB_TOKEN to a token from an account with admin or collaborator access to the repository you want to feature in the video. Creating a token does not grant access to another repository’s stargazers.
- Create a fine-grained personal access token.
- Set the Resource owner to the user or organization that owns the repository you want to feature. Under Repository access, select that repository. This is the repository whose stars you want to show, which may be different from your copy of this template.
- Keep the Metadata repository permission set to Read-only. If your organization requires token approval, have the token approved before rendering.
If you cannot select the target repository, check GitHub’s token limitations, including those affecting outside collaborators.
Use the token locally or in GitHub Actions as described below.
Make your own video (local)
-
Use this repo as a template
-
Follow the authentication steps, then create a .env file in the project root and add your token:
REMOTION_GITHUB_TOKEN=github_pat_...
Restart Remotion Studio after creating or updating .env.
- Install dependencies:
npm i
- Start the preview:
npm run dev
- Open the right sidebar and replace the example
repoOrg and repoName with the repository your token can access. Click “Render”.
Or use the command line:
npx remotion render
Make your own video (GitHub Actions)
- Fork this repo and follow the authentication steps.
- In your fork, go to Settings → Secrets and variables → Actions → New repository secret. Name the secret
REMOTION_GITHUB_TOKEN and paste your token as its value.
- Open the Actions tab and enable workflows if prompted.
- Select Render video → Run workflow. Enter the owner and name of the repository your token can access, along with the star count and duration.
- When the workflow finishes, download
out.mp4 from its artifacts.
The workflow uses your REMOTION_GITHUB_TOKEN secret. The automatic GITHUB_TOKEN is scoped to the repository running the workflow, so it does not grant access to another repository’s stargazer list.
Troubleshooting authentication
REMOTION_GITHUB_TOKEN is missing
For local renders, check that .env is in the project root and restart Remotion Studio. For GitHub Actions, add the REMOTION_GITHUB_TOKEN repository secret to the fork running the workflow.
401, 403, or Resource not accessible by integration
Check that the token has not expired, its account is an admin or collaborator of the target repository, and the target repository is included in the token’s access. For organization repositories, check any required approval or SSO authorization. Confirm that repoOrg and repoName identify that repository.
If GitHub explicitly reports a rate limit, wait until the limit resets before retrying.
No stargazers returned
Check whether the repository has stars. GitHub may also return an empty list when the token lacks access to its stargazers; follow the authentication checks above.
Upgrade Remotion
npx remotion upgrade
Credits
Made with Remotion
License
The code in this repository: Licensed under MIT.
The Remotion framework (a dependency of this project): Normally, companies need to obtain a paid license.
However, creating videos of this template is accepted without needing a company license.
评论