Skip to content

Commit cf0e619

Browse files
authored
added username to PR response object by swarajpure
2 parents 15e4f47 + c5739d6 commit cf0e619

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/githubService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ const { fetchUser } = require('../models/users')
88

99
const extractPRdetails = (data) => {
1010
const allPRs = []
11-
data.items.forEach(({ title, html_url: url, state, created_at: createdAt, updated_at: updatedAt, repository_url: repositoryUrl, labels, assignees }) => {
11+
data.items.forEach(({ title, user, html_url: url, state, created_at: createdAt, updated_at: updatedAt, repository_url: repositoryUrl, labels, assignees }) => {
1212
const allAssignees = assignees.map(object => object.login)
1313
const allLabels = labels.map(object => object.name)
1414
const repositoryUrlSplit = repositoryUrl.split('/')
1515
const repository = repositoryUrlSplit[repositoryUrlSplit.length - 1]
1616
allPRs.push({
1717
title,
18+
username: user.login,
1819
state,
1920
createdAt,
2021
updatedAt,

0 commit comments

Comments
 (0)