andreoliwa / nitpick

Enforce the same settings on multiple projects
https://nitpick.readthedocs.io/
MIT License
399 stars 25 forks source link

Allow Github Apps Access Tokens in Github URLs #602

Closed danygielow closed 1 year ago

danygielow commented 1 year ago

Expected behavior

nitpick should be able to fetch styles from private Github repos with access tokens derived from Github Apps.

Current behavior

Currently only Personal Access Tokens (starting with ghp) work correctly. Server to Server Tokens (starting with ghs) don't work and lead to a 404 Not Found.

Steps to reproduce

  1. Register a Github App
  2. Create an Access Token for that Github App
  3. Use that token in a Github URL in nitpick

Possible Solution

Currently the authentication method is a username only Basic Authentication. If a token Authorization header is used, as it is already for getting the default branch, then both Personal Access Tokens and Server to Server Tokens from Github Apps work. Could be that also now other Access Tokens also work, but I haven't tried them.

Context

We want to use Nitpick in our CI and don't want to use Personal Access Tokens but Github App Access Tokens instead.

Your environment

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 0.34.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: