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

Migrate PAT GitHub Token Usage #3603

Open
petertonysmith94 opened this issue Jan 21, 2025 · 4 comments · May be fixed by #3616
Open

Migrate PAT GitHub Token Usage #3603

petertonysmith94 opened this issue Jan 21, 2025 · 4 comments · May be fixed by #3616
Assignees
Labels
chore Issue is a chore

Comments

@petertonysmith94
Copy link
Contributor

petertonysmith94 commented Jan 21, 2025

Summary

Usage of the personal access token has now been removed therefore we need to migrate to an alternative means of authentication. All instances of REPO_TOKEN within our workflows need to change.

Some possible workarounds.

Usages

# workaround to ensure force pushes to changeset branch use REPO_TOKEN owner's account
# see https://github.com/changesets/action/issues/70
persist-credentials: false

  • pr-validate-changesets.yaml

- name: Set up .netrc file
if: env.CHANGESET_FILE == ''
run: |
echo "machine github.com" > $HOME/.netrc
echo "login github-actions[bot]" >> $HOME/.netrc
echo "password ${{ secrets.REPO_TOKEN }}" >> $HOME/.netrc
chmod 600 $HOME/.netrc

  • linear-pr-integration.yaml

github_token: ${{ secrets.REPO_TOKEN }}

@petertonysmith94 petertonysmith94 added the chore Issue is a chore label Jan 21, 2025
@petertonysmith94 petertonysmith94 self-assigned this Jan 21, 2025
@petertonysmith94 petertonysmith94 changed the title Migrate PAT GitHub Token Migrate PAT GitHub Token Usage Jan 21, 2025
@arboleya
Copy link
Member

I think we can start by using GITHUB_TOKEN everywhere.

Then we should make a list of:

  1. Things that stopped working (npm releases?)
  2. Automations that started requiring manual interventions (workflow approvals?)

With this list at hand, we can reasses things in isolation and discuss next resolution steps.

@petertonysmith94
Copy link
Contributor Author

I believe we're going to require an GitHub application long-term:

@arboleya
Copy link
Member

Great find!

@petertonysmith94 petertonysmith94 linked a pull request Jan 23, 2025 that will close this issue
8 tasks
@petertonysmith94
Copy link
Contributor Author

@arboleya I've gone over all the token usages and attempted to identify the possible permissions that a potential application might require.

I've summarised potential next steps within the following PR:

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

Successfully merging a pull request may close this issue.

2 participants