This is used for commenting on issues and PRs and adding them to projects.
- Create a new fine-grained personal access token.
- For the name, use
MithrilJS projects and comment token
- Set the expiration to 1 year from now. This is the longest the selector will let you choose.
- Set the resource owner to
@MithrilJS
. - In repository access, click "All repositories".
- In "Permissions", set:
- Repository Permissions > Issues to "Read and write"
- Repository Permissions > Pull requests to "Read and write"
- Organization Permissions > Projects to "Read and write"
I wish these could be narrowed...
- Go to the bottom of the page and click "Generate token".
- Copy the resulting token.
- Go to the target repo's settings, find "Secrets and variables", click the navigation dropdown, and click "Actions".
- In "Repository secrets", find
ISSUE_PR_PROJECTS_TOKEN
and click its edit icon. - Paste the copied token into the "Secret" field.
- Click "Add secret".
- Come back to this repo, find the
$NAME
property in the relevant project object ofprojects
inlib/config.js
, and update itstokenExpiryDate
to match the new expiry date for the token you're updating.
For now, create a classic token of type "Automation". We can switch to the fine-grained ones once a centralized system is set up.
- Sign into npm on the web.
- Click your avatar on the upper right of the page, and select "Access Tokens".
- Click "Generate New Token", then in the dropdown, click "Classic Token".
- For the name, choose something descriptive enough for you to be able to find it. Listing out accessible packages in the name is good enough.
- Click "Generate Token".
- Copy the token from above the table.
- Go to this repo's Actions secrets page.
- Click "New repository secret".
- Come up with a unique, descriptive name, and use that for the name.
- Paste the copied token into the "Secret" field.
- Click "Add secret".