Skip to content

Commit

Permalink
Fix closed draft pr colour (#219)
Browse files Browse the repository at this point in the history
Fix color for closed draft PR display

This commit addresses a UI issue where the color of closed draft pull requests
was not displayed correctly.
  • Loading branch information
wweqg authored Nov 24, 2023
1 parent ec22b01 commit 94f7750
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ export class IssuePrCardHeaderComponent {

/** Returns status color for issue */
getIssueOpenOrCloseColor() {
if (this.issue.isDraft) {
return 'grey';
}
if (this.issue.state === 'OPEN') {
return 'green';
if (this.issue.isDraft) {
return 'grey';
} else {
return 'green';
}
} else if (this.issue.issueOrPr === 'PullRequest' && this.issue.state === 'CLOSED') {
return 'red';
} else if (this.issue.issueOrPr === 'Issue' && this.issue.stateReason === 'NOT_PLANNED') {
Expand Down
9 changes: 5 additions & 4 deletions src/app/shared/issue-pr-card/issue-pr-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ export class IssuePrCardComponent {

/** Returns CSS class for border color */
getIssueOpenOrCloseColorCSSClass() {
if (this.issue.isDraft) {
return 'grey';
}
if (this.issue.state === 'OPEN') {
return 'border-green';
if (this.issue.isDraft) {
return 'grey';
} else {
return 'border-green';
}
} else if (this.issue.issueOrPr === 'PullRequest' && this.issue.state === 'CLOSED') {
return 'border-red';
} else if (this.issue.issueOrPr === 'Issue' && this.issue.stateReason === 'NOT_PLANNED') {
Expand Down

0 comments on commit 94f7750

Please sign in to comment.