Please clone this repo to your own GitHub account, or if you don't have one, just check it out locally, but in that case please don't push the results
A technical exercise for SRE interviews, exploring coding approach and API interactions.
You can use JavaScript, Python, or shell to complete this task. All the tasks require you have Git installed on your machine.
You will need to use the GitHub API, specifically the List repository issues endpoint. Feel free to use Octokit.js or PyGithub.
For the public Oak Web Application repository on GitHub:
- Write a function which fetches and returns the repo's issues, as an object of the form
{ open: [], closed: [] }
(if using Javascript useper_page=100
parameter to speed up fetching all the data) - Set up a classic token in Github and use that to connect as an authenticated user
- Write a function which takes a list of open issues, and returns any issue with comments from a non bot user.
- Write a function which takes a list of open issues, and returns a list of posters (users) and how many times they have commented in total.
- Write a function which returns some health metrics for the repo. This could include:
- average time taken to close issues
- open vs closed issue ratio
- number of issues with no comments
- number of stars and forks
- number of contributors
- what else could you include?
Feel free to organise your code as best you see fit.
If you'd prefer to write in Javascript, there's some boilerplate code for you in the /js
directory, if Python's your thing, head to /python
, or if you prefer shell /sh
.
Testing is encouraged, but try to ensure to test your own logic, not that an external API is doing what it should be doing.