Your bug may already be reported!
Please search on the issue tracker before creating one.
If you found an issue, write a comment or upvote it with a thumbs-up 👍🏻.
Expected behavior
I should be able to get the style from a private repo within a GitHub team.
Current behavior
Currently getting a 404 error with URL not found.
Steps to reproduce
- Put a nitpick style in a private repo
- Create a PAT with the
repos scope
- Add
github://$GITHUB_PAT@team-name/repo-name/nitpick-style.toml to a pyproject.toml in another project ($GITHUB_PAT is the GitHub Personal Access Token, which can either be copy-pasted or as a env variable, as described in the documentation).
- Run
nitpick check
- Get 404.
Possible Solution
I looked at the fetcher for GitHub URLs and I noticed that there isn't an aspect which also specifies the username. I tried to use curl as shown by the GitHub API docs and was able to get to the correct repo and file because I provided both my username and the PAT in -u.
Context
We have a common template repository with rules and such for GitHub Actions and a common style guide, but any changes to it need to be manually updated to all derived repositories. Nitpick reminds me of ESLint configs (like AirBnB's) where there can be a single source that projects can pull from, and any changes can be reflected throughout.
Your environment
-
nitpick version used: 0.31.0
-
Python version: 3.9.9
-
Operating System and version: Mac OS 12.0.1
-
Link to your project:
-
Run the following commands and paste the output:
which python3
python3 -V
pip freeze
cat $(which flake8)
For more information, see the CONTRIBUTING guide.
Your bug may already be reported!
Please search on the issue tracker before creating one.
If you found an issue, write a comment or upvote it with a thumbs-up 👍🏻.
Expected behavior
I should be able to get the style from a private repo within a GitHub team.
Current behavior
Currently getting a 404 error with URL not found.
Steps to reproduce
reposscopegithub://$GITHUB_PAT@team-name/repo-name/nitpick-style.tomlto apyproject.tomlin another project ($GITHUB_PATis the GitHub Personal Access Token, which can either be copy-pasted or as a env variable, as described in the documentation).nitpick checkPossible Solution
I looked at the fetcher for GitHub URLs and I noticed that there isn't an aspect which also specifies the username. I tried to use
curlas shown by the GitHub API docs and was able to get to the correct repo and file because I provided both my username and the PAT in-u.Context
We have a common template repository with rules and such for GitHub Actions and a common style guide, but any changes to it need to be manually updated to all derived repositories. Nitpick reminds me of ESLint configs (like AirBnB's) where there can be a single source that projects can pull from, and any changes can be reflected throughout.
Your environment
nitpickversion used: 0.31.0Python version: 3.9.9
Operating System and version: Mac OS 12.0.1
Link to your project:
Run the following commands and paste the output:
which python3 python3 -V pip freeze cat $(which flake8)For more information, see the CONTRIBUTING guide.