-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add featured pull requests to team profile cards with GitHub REST API #28
Comments
Can I work on this? I don't understand it totally yet but I'm willing to research and learn as I work. |
@bl-aire This issue is complex and will take time to implement. But there are some nice new Hugo features that make it easier. I think a good first step for this issue would be to try to hit the GitHub API from a test Hugo layout and see if you can grab different data from the GitHub API. I think data we will want about any Pull Request is the title, description, merge status, number of comments, and a link to the Pull Request. Depending how we specify the front-matter in a post, this could be filled into the layout based on what data we could pull from the GitHub API. But for proof-of-concept, we could start with embedding any GitHub API data about Pull Requests into a page in Hugo. @bl-aire What do you think? Does this make sense? Is it something you'd like to work on? |
It makes sense. I have always been curious about how API's work but I've never had the opportunity to build or work with one. This would be an amazing learning experience for me so I am willing to start researching while I work on #69. But while learning, if I come across any problems, I will reach out for help. |
@jwflory hello, My goal at the beginning of the week was to learn and understand how GitHub's API works and how I can achieve the goal for this issue. To try out ideas I had, I created a basic Hugo app and used Hugo's shortcodes feature to connect to GitHub's API and make a Get request. I was able to get data about the unicef/inventory repository and reference it in my app's template...(a picture is available below). My goal now is to make targeted Get requests for the: Team profiles are available in the inventory repository but this current issue is in the inventory-Hugo-theme repository. |
I think we should add the layout of team profiles in this repo. Currently we have this layouts in the inventory site but this makes it difficult to make changes as we have to make changes in the inventory repository . |
Hi @Neha9849, I have had this on my mind for a while now. This approach was the first thought I had too. I'm super relieved I can talk to someone that understands my current problem. Hoping we get a solution to it soon |
Nice work 👍🏻
Makes sense. Note that the Pull Requests in question would be specified with a URL in the front-matter somewhere.
This is a good observation. This is tied into #35. The goal is to bring the team profiles within the scope of the theme and not the Open Source Inventory site. It is probably best to hold off on this issue until the team profiles are absorbed into the theme. Then, grabbing those specific fields from the GitHub API and embedding them into the layout will become easier. Does this make sense? The work in #35 will make this more straightforward too. It was opened here because ideally this work would live in this repo in the long-term. |
@jwflory, noted. Thank you |
Since I am working on the Team Profiles layout, can I help with this as well? |
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:
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
The text was updated successfully, but these errors were encountered: