This will be quick, this week I learned about PyGitHub, that implements and interacts GitHub API v3 and GitHub Enterprise APIv3 in Python and could possibly help you with any crazy ideas that you might have with repositories on GitHub. Want to check for files on GitHub in one or 1000 repositories of an organization/individual. Done. Want to make a pull request, issues, and other administration tasks through scripts that users with access to. Done. Want to check repositories for certain parameters such as last release, members both Public and Private. Done.
Where to get started?
Well, in my personal opinion if you haven’t dealt with API’s before then it would be a pain and a steep learning curve but it’s quite easy altogether once you get the hang of it through the examples mentioned below.
All of my and other scripts would be uploaded soon vipulgupta2048/wikiport. Check it out.
Read the Docs for the GitHub APIv3 here – https://developer.github.com/v3/
PyGitHub docs – http://pygithub.readthedocs.io/en/latest/introduction.html
Show me the code – https://github.com/PyGithub/PyGithub
Examples of scripts (That’s where I learnt from) – https://chase-seibert.github.io/blog/2016/07/22/pygithub-examples.html
Join their Gitter and ask them questions – https://gitter.im/PyGithub/PyGithub
Week 4 Updates
What I have been upto?
- Completed All Bonding period tasks.
- Wrote a blog post on ConfigParser and how I am using it, https://mixstersite.wordpress.com/2018/05/16/racing-through-config-files-with-configparser-in-python-w3/
- Making the analysis script for activity repositories on Github using PyGithub, GitHub API, and ConfigParser. The draft has been made; need to fine tune it more.
(Will be posting the draft soon enough on my repository) - I also reviewed a script RdSadhu sent of his migration process.
Challenges:
I have a faced bump in the road, with getting the summary out of README.md. The file is just not regular enough for a script to work and I often get wrong or incomplete.
Problem – I need to extract the summary of an activity from its readme.md or wherever. This summary will be used to showcase as activity description on ASLOv3.
To which in a review Quozl, prompted me that it might not be possible to get a review out the activities. So gonna work out a different way.
Nice informative post…Thanks for sharing..