- introduce branch (head ref) as data point in the PullRequestInfo object

- expand extractor to allow using the `branch` -> e.g. to extract the label
This commit is contained in:
Mike Penz
2022-07-27 17:19:50 +02:00
parent 0e96047683
commit c4a63d86ad
5 changed files with 18 additions and 6 deletions
+2
View File
@@ -9,6 +9,7 @@ export interface PullRequestInfo {
title: string
htmlURL: string
baseBranch: string
branch?: string
createdAt: moment.Moment
mergedAt: moment.Moment | null
mergeCommitSha: string
@@ -227,6 +228,7 @@ const mapPullRequest = (
title: pr.title,
htmlURL: pr.html_url,
baseBranch: pr.base.ref,
branch: pr.head.ref,
createdAt: moment(pr.created_at),
mergedAt: pr.merged_at ? moment(pr.merged_at) : null,
mergeCommitSha: pr.merge_commit_sha || '',