Open CJ-Wright opened 7 years ago
You want to generate a "Personal access token" (here).
I forget exactly which permissions are required, but I believe I have mine set to use public_repo
, read:org
, read:repo_hook
, repo:status
, repo_deployment
for development (which is probably way overkill!)
Keep in mind you can edit the permissions after you generate the token, so if you don't allow enough access (or want to try removing access) you can after the fact.
This is definitely something I should look into again and document. If you figure anything out please post here!
I realized the problem I was having was due to the github package not supporting teams (and thus missing all the repos associated with me). I have a work around now which kinda works (using requests to get all my repos and then feeding them into feedstockrot).
If you want to share that code I'd definitely be interested in taking a peak! I imagine this is only going to become more of an issue going forward. Maybe worth patching the github package even, or making our own small module that just has a subset of the functionality we need.
This was written in xonsh so I combined the CLI call and the requests library stuff together. You could just hand d
to feedstockrot.
import requests
def main(user, password):
# get all the packages for the user
gr = requests.get('https://api.github.com/user/teams',
auth=(str(user), str(password)))
a = gr.json()
b = [c for c in a if 'conda-forge' in c['organization']['html_url']]
d = [z['name'] for z in b if z['name'] != 'all-members']
for s in d:
feedstockrot @(s)
Edit: add link to xonsh
Also you might try to combine this with https://github.com/conda-forge/conda-forge.github.io/blob/master/scripts/tick_my_feedstocks.py which will also bump versions for out of date feedstocks, although it only works for pypi (hence the collaboration, they bring the bumping support and this project brings the github release support)
What kind of token is needed? Which permissions?