inventory-hugo-theme
inventory-hugo-theme copied to clipboard
Add featured pull requests to team profile cards with GitHub REST API
Summary
Provide a list of GitHub Pull Request URLs in team profile front matter, and add metadata about the Pull Requests to the team profile (by way of GitHub REST API)
Background
Is the improvement related to a problem? Describe the problem: Sometimes there are noteworthy Pull Requests we want to highlight by a specific Innovation Fund start-up. This can happen when a start-up implements a major feature as part of their roadmaps, or if they make an upstream contribution to another Open Source project. This is related to the design of team profiles (#13).
What does the improvement look like to you?: Previous wireframe designs suggested something like this for the summarized "card" view and the full team profile:
Describe any alternatives considered: This information could be manually embedded on each team profile, but this becomes difficult to maintain very quickly.
Details
This improvement is blocked by the initial implementation of team profiles as defined in #13.
The GitHub REST API should be used to gather metadata about a Pull Request and embed the relevant metadata into the team profile card and full profile. The featured Pull Requests should be defined in the front matter of a specific team profile.
For the content writer, all they should have to do to "feature" a Pull Request is specify it in the team profile's front matter, like below:
pulls:
- https://github.com/example/pull1
- https://github.com/example/pull2
- https://github.com/example/pull3
Behind the scenes, the template should use GitHub's REST API to send a GET
request for the relevant metadata from the Pull Requests and embed this in the template for the team profile card and the full profile page. The team profiles should render correctly even if zero, one, or many Pull Requests are provided for a specific team.
The API token for GitHub Pages (a.k.a. production deployments) can be stored safely in the Circle CI pipeline, but there should be a way to use a GitHub API token for local development too.
Outcome
Innovation Fund start-ups that complete exceptional work in GitHub Pull Requests can have their work and/or contributions highlighted in their team profile