badges / badges/shields

Badge request: GitHub merged pull requests

Open
#6,164 14 comments 0 reactions 0 assignees View on GitHub
service-badge
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

:clipboard: **Description**

I would like a badge that counts all of the pull requests that was merged only, the closed pr badge could be changed I think to filter out merged prs.

- The badge is for GitHub.
- What sort of information should this badge show?
The badge should contain the count of merged pull requests, also the count of merged pull requests could also be used to subtract from the closed pull request badge to (or well make a version of it that excludes merged prs).

:link: [![example](https://img.shields.io/badge/merged%20pull%20requests-100%20merged-darkviolet)]()

Where can we get the data from?
list the pull requests first using ``GET https://api.github.com/repos/{owner}/{repo}/pulls`` then request:
``GET https://api.github.com/repos/{owner}/{repo}/pulls/{pull_number}/merge``

- Is there a public API?
yes
- Does the API requires an API key?
Nope.

- Link to the API documentation.
https://docs.github.com/en/rest/reference/pulls#list-pull-requests
https://docs.github.com/en/rest/reference/pulls#check-if-a-pull-request-has-been-merged

:microphone: **Motivation**

I noticed that we could show up opened, closed issues and pull requests among other things however lacked the ability to get a badge for merged pull requests.

- What is the specific use case?
People like me want to show that we merge pull requests a ton and it would support those who feel like contributing to projects too.

Contributor guide

Open the contributing guide

Research direction

Start with the GitHub REST API endpoints linked in the issue: list repository pull requests, then check whether each pull request was merged. Define the badge output and how merged pull requests relate to the existing closed pull request badge; done means the badge reports the requested merged count using the public API.

Written by the indexing model from the issue text.

Assessment

Tech stack
github
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.