This package gets the last week of merged pull requests for a specific organization from GitHub.
import { fetchRecentlyClosedPullRequests } from "weekly-summary-typescript";
const recentlyClosedPullRequests = await fetchRecentlyClosedPullRequests(
{
organization: `my-organization`
},
`my-github-auth-token`
);
Pull requests are returned as an object where the key is the repository's name and the value is an array of objects that include information about the pull request. For example:
{
"weekly-summary-typescript": [
{
"repository": {
"name": "weekly-summary-typescript"
},
"title": "refactor(github): changes setup for GitHub auth token",
"createdAt": "2019-11-02T19:14:53Z",
"closedAt": "2019-11-03T10:58:15Z",
"url": "https://github.com/tmr08c/weekly-summary-typescript/pull/14",
"merged": true
},
{
"repository": {
"name": "weekly-summary-typescript"
},
"title": "chore: sets up commitizen",
"createdAt": "2019-11-02T19:00:06Z",
"closedAt": "2019-11-02T19:00:51Z",
"url": "https://github.com/tmr08c/weekly-summary-typescript/pull/13",
"merged": true
}
]
}