Files
openproject/modules/github_integration/frontend/module/state/github-pull-request.model.ts
T
Judith Roth a0b38ba8ee [#56994] Fix git snippet for GitHub appear broken (although it isn't)
For short commit messages it seemed like there was no whitespace
between the description and the link. This was never a problem
because when copying via the button newlines would be used to separate
the two. However, for short commit messages it looked broken.

https://community.openproject.org/projects/openproject/work_packages/56994
2024-08-12 16:48:24 +02:00

74 lines
1.5 KiB
TypeScript

import {
IHalResourceLink,
IHalResourceLinks,
} from 'core-app/core/state/hal-resource';
import { ID } from '@datorama/akita';
export interface ISnippet {
id:string;
name:string;
textToDisplay:() => string;
textToCopy:() => string
}
export interface IGithubUserResource {
avatarUrl:string;
htmlUrl:string;
login:string;
}
export interface IGithubCheckRunResource {
appOwnerAvatarUrl:string;
completedAt:string;
conclusion:string;
detailsUrl:string;
htmlUrl:string;
name:string;
outputSummary:string;
outputTitle:string;
startedAt:string;
status:string;
}
export interface IGithubPullRequestResourceLinks extends IHalResourceLinks {
githubUser:IHalResourceLink;
mergedBy?:IHalResourceLink;
checkRuns?:IHalResourceLink[];
}
export interface IGithubPullRequestResourceEmbedded {
githubUser:IGithubUserResource;
mergedBy?:IGithubUserResource;
checkRuns:IGithubCheckRunResource[];
}
export interface IGithubPullRequest {
id:ID;
additionsCount?:number;
body?:{
format?:string;
raw?:string;
html?:string;
},
changedFilesCount?:number;
commentsCount?:number;
createdAt?:string;
deletionsCount?:number;
draft?:boolean;
githubUpdatedAt?:string;
htmlUrl:string;
labels?:string[];
merged?:boolean;
mergedAt?:string;
number?:number;
repository:string;
repositoryHtmlUrl:string;
reviewCommentsCount?:number;
state?:string;
title:string;
updatedAt?:string;
_links:IGithubPullRequestResourceLinks;
_embedded:IGithubPullRequestResourceEmbedded;
}