Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project token to org #22

Closed
Tracked by #16
kernelsam opened this issue Jun 13, 2023 · 4 comments
Closed
Tracked by #16

Add project token to org #22

kernelsam opened this issue Jun 13, 2023 · 4 comments
Assignees

Comments

@kernelsam
Copy link
Contributor

kernelsam commented Jun 13, 2023

To be used by #16, needs to be set in the called workflow as well as the caller workflow.

This is currently set to the existing token used for linking classic projects which does not have the correct permissions, see output.

This action is being taken in conjunction with #15 as tokens should always have the minimum level of permissions required to run the respective workflow.

Create a fine-grained personal access token - the account needs to have access to the respective project(s) and repository(s).

  1. In the upper-right corner of any page, click your profile photo, then click Settings.
  2. In the left sidebar, click Developer settings.
  3. In the left sidebar, under Personal access tokens, select Tokens (classic).
  4. Click Generate new token.
  5. Under Note, enter a name for the token: SENZING_GITHUB_PROJECT_RW_TOKEN.
  6. Under Expiration, select an expiration for the token.
  7. Under Select scopes select the following:
    • ☑️ project
      • ☑️ read:project
  8. Click Generate token.
  9. Copy the new token as it will only be viewable once and we will use it in Step 2 below.
  10. Add the newly generated token in step 1 as an organization secret for Dependabot

Note: To create secrets at the organization level, you must have admin access.

  1. On GitHub.com, navigate to the main page of the organization.
  2. Under your organization name, click Settings. If you cannot see the Settings tab, select the dropdown menu, then click Settings.
  3. In the Security section of the sidebar, select * Secrets and variables, then click Dependabot.
  4. Click New organization secret.
  5. In the Name input box type: SENZING_GITHUB_PROJECT_RW_TOKEN .
  6. Input the token generated above into the text box.
  7. From the Repository access dropdown list, choose Selected repositories.
  8. Under the Selected repositories dropdown, select the following:
    • build-resources
  9. Click Add secret.
  10. In the Security section of the sidebar, select * Secrets and variables, then click Actions.
  11. Click New organization secret.
  12. In the Name input box type: SENZING_GITHUB_PROJECT_RW_TOKEN .
  13. Input the token generated above into the text box.
  14. From the Repository access dropdown list, choose Selected repositories.
  15. Under the Selected repositories dropdown, select the following:
    • build-resources
  16. Click Add secret.
@docktermj
Copy link
Contributor

@kernelsam Done, but had to use some instructions from #6.

Also, after an instruction like:

In the Name input box type: CODEOWNER_PR_RW_TOKEN.

there needs to be in instruction to put the value of the token into the text box.

@kernelsam
Copy link
Contributor Author

@docktermj I updated the description in #6 as well as this issue with instructions for inputing the token in the text box.
What instructions did you need to use from #6?

@docktermj docktermj reopened this Jun 19, 2023
@github-actions github-actions bot added the triage Need to triage label Jun 19, 2023
@docktermj docktermj removed the triage Need to triage label Jun 19, 2023
@kernelsam
Copy link
Contributor Author

Moving back to in progress. This is missing in the actions secrets.
From above description:

In the Security section of the sidebar, select * Secrets and variables, then click Actions.
Click New organization secret.
In the Name input box type: PROJECT_RW_TOKEN.
Input the token generated above into the text box.
From the Repository access dropdown list, choose Selected repositories.
Under the Selected repositories dropdown, select the following:
build-resources
Click Add secret.

@kernelsam
Copy link
Contributor Author

@docktermj per discussion I have updated the token name in the description of this issue to SENZING_GITHUB_PROJECT_RW_TOKEN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants