mirror of
https://github.com/outline/outline.git
synced 2026-11-25 15:15:15 +03:00
Show correct icon & color for GitHub draft PR
This commit is contained in:
1 parent
e503225f04
commit
1206e2cf77
6 files changed
+26
-43
No files matched your search
@@ -279,7 +279,8 @@ export class GitHub {
|
||||
},
|
||||
state: {
|
||||
name: prState,
|
||||
color: GitHubUtils.getColorForStatus(prState),
|
||||
color: GitHubUtils.getColorForStatus(prState, !!pr.draft),
|
||||
draft: pr.draft,
|
||||
},
|
||||
createdAt: pr.created_at,
|
||||
transformed_unfurl: true,
|
||||
|
||||
@@ -45,10 +45,10 @@ export class GitHubUtils {
|
||||
return `${this.url}?install_request=true`;
|
||||
}
|
||||
|
||||
public static getColorForStatus(status: string) {
|
||||
public static getColorForStatus(status: string, isDraftPR: boolean = false) {
|
||||
switch (status) {
|
||||
case "open":
|
||||
return "#238636";
|
||||
return isDraftPR ? "#848d97" : "#238636";
|
||||
case "done":
|
||||
return "#a371f7";
|
||||
case "closed":
|
||||
|
||||
Reference in new issue
Block a user