|
1 |
| -# Config file for pull-request-badge. See: https://pullrequestbadge.com/ |
2 |
| -# Enables badges to be inserted into the PR description, based on certain conditions |
| 1 | +# Config file for pull-request-badge. See: https://pullrequestbadge.com/ by @stefanbuck |
| 2 | +# Dynamically inserts status badges into PR description, based on certain conditions |
3 | 3 |
|
4 | 4 | # Checks if the required sections are missing
|
5 | 5 | - label: "⚠️Missing"
|
|
23 | 23 | color: "#f25265"
|
24 | 24 | when: "$labels.length == 0"
|
25 | 25 |
|
26 |
| -# Show note when in draft mode |
| 26 | +# Show note when task list has unfinished items |
| 27 | +- label: "⚠️Notice" |
| 28 | + message: "Unchecked Tasks" |
| 29 | + when: "$payload.pull_request.body.includes('- [ ] ')" |
| 30 | + color: "#f25265" |
| 31 | + |
| 32 | +# Show badge indicating PR status |
27 | 33 | - label: "Status"
|
28 |
| - message: "Draft" |
| 34 | + message: "✏️ Draft" |
29 | 35 | when: "$isDraft"
|
30 | 36 | color: "#ffa933"
|
| 37 | +- label: "Status" |
| 38 | + message: "🧱 Work in Progress" |
| 39 | + when: "$payload.pull_request.title.includes('WIP')" |
| 40 | + color: "#29e3f4" |
| 41 | +- label: "Status" |
| 42 | + message: "✅ Ready" |
| 43 | + color: "#3ef963" |
| 44 | + when: "$labels.includes('🔀 Ready for Merge')" |
31 | 45 |
|
32 | 46 | # Add size label based on very large or tiny PRs
|
| 47 | +- label: "PR Size" |
| 48 | + message: "Extra Large" |
| 49 | + color: "#f9833e" |
| 50 | + when: "$additions > 1000" |
33 | 51 | - label: "PR Size"
|
34 | 52 | message: "Large"
|
35 |
| - color: "#f79c47" |
36 |
| - when: "$additions > 600" |
| 53 | + color: "#f4b546" |
| 54 | + when: "$additions > 500 && $additions < 1000" |
| 55 | +- label: "PR Size" |
| 56 | + message: "Medium" |
| 57 | + color: "#f3ff59" |
| 58 | + when: "$additions > 10 && $additions < 500" |
37 | 59 | - label: "PR Size"
|
38 | 60 | message: "Quick"
|
39 | 61 | color: "#3eef8b"
|
40 |
| - when: "$additions < 5" |
| 62 | + when: "$additions < 10" |
41 | 63 |
|
42 | 64 | # Show PR number, to destination and from destination
|
43 | 65 | - label: "#$prNumber"
|
|
57 | 79 | when: "$payload.pull_request.author_association !== 'OWNER'"
|
58 | 80 | url: "https://github.com/$payload.pull_request.user.login"
|
59 | 81 |
|
60 |
| -# Show a badge indicating the PR category |
| 82 | +# Show a badge indicating the PR category, based on tag |
61 | 83 | - label: "Type"
|
62 | 84 | message: "✨ Feature"
|
63 | 85 | color: "#39b0fd"
|
|
90 | 112 | message: "🌟 Showcase Addition"
|
91 | 113 | color: "#39b0fd"
|
92 | 114 | when: "$labels.includes('💯 Showcase')"
|
| 115 | +- label: "Type" |
| 116 | + message: "🏗️ Architecture" |
| 117 | + color: "#39b0fd" |
| 118 | + when: "$labels.includes('🏗️ Architectural Changes')" |
| 119 | +- label: "Type" |
| 120 | + message: "🤖 Auto Submission" |
| 121 | + color: "#39b0fd" |
| 122 | + when: "$labels.includes('🤖 Auto')" |
| 123 | +- label: "Type" |
| 124 | + message: "🌐 Language Update" |
| 125 | + color: "#39b0fd" |
| 126 | + when: "$labels.includes('🌐 Language')" |
| 127 | + |
| 128 | +# Show warning, when certain tags are applied |
| 129 | +- label: "Warning" |
| 130 | + message: "⛔ Do Not Merge" |
| 131 | + color: "#f25265" |
| 132 | + when: "$labels.includes('⛔ Don't Merge')" |
| 133 | +- label: "Warning" |
| 134 | + message: "🚫 Merge Conflicts" |
| 135 | + color: "#f25265" |
| 136 | + when: "$labels.includes('🚫 Merge Conflicts')" |
| 137 | +- label: "Warning" |
| 138 | + message: "🕸️ Inactive" |
| 139 | + color: "#f25265" |
| 140 | + when: "$labels.includes('🕸️ Inactive')" |
| 141 | +- label: "Warning" |
| 142 | + message: "💀 Spam" |
| 143 | + color: "#f25265" |
| 144 | + when: "$labels.includes('💀 Spam')" |
| 145 | + |
0 commit comments