Skip to content

Commit

Permalink
fix: add draft state for PRs (fixes #205)
Browse files Browse the repository at this point in the history
  • Loading branch information
freaktechnik committed Jan 15, 2021
1 parent d641422 commit 178de17
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 44 deletions.
Binary file added images/pull-wip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions images/pull-wip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
238 changes: 195 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"stylelint": "^13.8.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-no-unsupported-browser-features": "^4.1.4",
"web-ext": "^5.4.1"
"web-ext": "^5.5.0"
},
"stylelint": {
"extends": "stylelint-config-standard",
Expand Down
3 changes: 3 additions & 0 deletions scripts/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class ClientHandler extends window.Storage {
if(notification.subjectDetails.merged) {
return "images/pull-merged.";
}
if(notification.subjectDetails.draft && notification.subjectDetails.state === 'open') {
return "images/pull-wip.";
}

return `images/pull-${notification.subjectDetails.state}.`;
}
Expand Down

0 comments on commit 178de17

Please sign in to comment.