├── .gitignore ├── run.sh ├── dry-run.sh ├── run-all.sh ├── update-repositories.sh ├── README.md ├── LICENSE ├── labels-site.json └── labels-common.json /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | repositories.txt 3 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | env $(cat .env | xargs) github-label-sync --labels="./labels-$1.json" --allow-added-labels "$2" 3 | 4 | -------------------------------------------------------------------------------- /dry-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | env $(cat .env | xargs) github-label-sync --dry-run --labels="./labels-$1.json" --allow-added-labels "$2" 3 | 4 | -------------------------------------------------------------------------------- /run-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ./update-repositories.sh 3 | while IFS= read -r repo; do 4 | env $(cat .env | xargs) github-label-sync --labels=./labels-common.json --allow-added-labels "$repo" 5 | done < repositories.txt 6 | -------------------------------------------------------------------------------- /update-repositories.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | curl "https://api.github.com/users/nhoizey/repos?per_page=100&page=1" | jq -r '.[] | if .fork == false and .archived == false then "nhoizey/" + .name else empty end' > repositories.txt 3 | curl "https://api.github.com/users/esviji/repos?per_page=100&page=1" | jq -r '.[] | "esviji/" + .name' >> repositories.txt 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Default labels for my new Github repository issues and Pull Requests 2 | 3 | Using Financial Times' [github-label-sync](https://github.com/Financial-Times/github-label-sync). 4 | 5 | ## Access token 6 | 7 | Generate an [access token here](https://github.com/settings/tokens) with the `repo` scope and add it to a local `.env` file: 8 | 9 | ```env 10 | GITHUB_ACCESS_TOKEN= 11 | ``` 12 | 13 | ## Dry run 14 | 15 | Useful to check what will be done before actually doing it, and change configuration (adding aliases) if needed. 16 | 17 | ```bash 18 | ./dry-run.sh / 19 | ``` 20 | 21 | For example: 22 | 23 | ```bash 24 | ./dry-run.sh common nhoizey/images-responsiver 25 | ``` 26 | 27 | ## Run 28 | 29 | ```bash 30 | ./run.sh / 31 | ``` 32 | 33 | ## ⚠️ Syn common labels on ALL my repositories that are neither forks nor archived 34 | 35 | ```bash 36 | ./run-all.sh 37 | ``` 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Nicolas Hoizey 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /labels-site.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "feature: UX (User eXperience) 🤹‍♂️", 4 | "color": "cceeff", 5 | "aliases": [ 6 | "ux", 7 | "type: UX (User eXperience) 🤹‍♂️" 8 | ] 9 | }, 10 | { 11 | "name": "feature: accessibility (a11y) ♿️", 12 | "color": "cceeff", 13 | "aliases": [ 14 | "accessibility", 15 | "a11y" 16 | ] 17 | }, 18 | { 19 | "name": "feature: DX (Developer eXperience) 👨‍💻", 20 | "color": "cceeff", 21 | "aliases": [ 22 | "dx", 23 | "type: DX (Developer eXperience) 👨‍💻" 24 | ] 25 | }, 26 | { 27 | "name": "feature: AX (Author eXperience) ✍️", 28 | "color": "cceeff", 29 | "aliases": [ 30 | "ax", 31 | "type: AX (Author eXperience) ✍️" 32 | ] 33 | }, 34 | { 35 | "name": "feature: content 🗂", 36 | "color": "cceeff", 37 | "aliases": [ 38 | "content" 39 | ] 40 | }, 41 | { 42 | "name": "feature: graphic design 🎨", 43 | "color": "cceeff", 44 | "aliases": [ 45 | "design", 46 | "Type: design", 47 | "type: design 🎨", 48 | "type: graphic design 🎨" 49 | ] 50 | }, 51 | { 52 | "name": "feature: offline 📶", 53 | "color": "cceeff", 54 | "aliases": [ 55 | "offline" 56 | ] 57 | }, 58 | { 59 | "name": "feature: search 🕵️‍♂️", 60 | "color": "cceeff", 61 | "aliases": [ 62 | "search" 63 | ] 64 | }, 65 | { 66 | "name": "feature: SEO 🔎", 67 | "color": "cceeff", 68 | "aliases": [ 69 | "SEO" 70 | ] 71 | }, 72 | { 73 | "name": "feature: POSSE 📡", 74 | "color": "cceeff", 75 | "aliases": [ 76 | "SEO" 77 | ] 78 | }, 79 | { 80 | "name": "feature: WebPerf 🏎", 81 | "color": "cceeff", 82 | "aliases": [ 83 | "webperf" 84 | ] 85 | }, 86 | { 87 | "name": "feature: webmention 💭", 88 | "color": "cceeff", 89 | "aliases": [ 90 | "webmention" 91 | ] 92 | }, 93 | { 94 | "name": "environment: desktop 🖥", 95 | "color": "ccaadd", 96 | "aliases": [ 97 | "Client: desktop browser" 98 | ] 99 | }, 100 | { 101 | "name": "environment: mobile 📱", 102 | "color": "ccaadd", 103 | "aliases": [ 104 | "Client: mobile browser" 105 | ] 106 | } 107 | ] -------------------------------------------------------------------------------- /labels-common.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "type: bug 🐛", 4 | "color": "ddeebb", 5 | "aliases": [ 6 | "bug" 7 | ] 8 | }, 9 | { 10 | "name": "type: breaking 💔", 11 | "color": "ddeebb", 12 | "aliases": [ 13 | "breaking", 14 | "breaking-change" 15 | ] 16 | }, 17 | { 18 | "name": "type: security 💣", 19 | "color": "ddeebb", 20 | "aliases": [ 21 | "security" 22 | ] 23 | }, 24 | { 25 | "name": "type: maintenance 👷‍♂️", 26 | "color": "ddeebb", 27 | "aliases": [ 28 | "maintenance", 29 | "refactor", 30 | "testing", 31 | "test" 32 | ] 33 | }, 34 | { 35 | "name": "type: enhancement 🧗‍♂️", 36 | "color": "ddeebb", 37 | "aliases": [ 38 | "enhancement", 39 | "feature" 40 | ] 41 | }, 42 | { 43 | "name": "type: question ❓", 44 | "color": "ddeebb", 45 | "aliases": [ 46 | "question" 47 | ] 48 | }, 49 | { 50 | "name": "type: discussion 💬", 51 | "color": "ddeebb", 52 | "aliases": [ 53 | "discussion", 54 | "To be discussed" 55 | ] 56 | }, 57 | { 58 | "name": "type: dependencies 🔗", 59 | "color": "ddeebb", 60 | "aliases": [ 61 | "dependencies", 62 | "type: dependencies 🧷" 63 | ] 64 | }, 65 | { 66 | "name": "feature: documentation 📑", 67 | "color": "cceeff", 68 | "aliases": [ 69 | "documentation", 70 | "type: documentation 📑" 71 | ] 72 | }, 73 | { 74 | "name": "feature: marketing 📢", 75 | "color": "cceeff", 76 | "aliases": [ 77 | "marketing", 78 | "type: marketing 📢" 79 | ] 80 | }, 81 | { 82 | "name": "priority: low 🟢", 83 | "color": "66dd66" 84 | }, 85 | { 86 | "name": "priority: medium 🟡", 87 | "color": "ffcc66", 88 | "aliases": [ 89 | "Issue priority: normal" 90 | ] 91 | }, 92 | { 93 | "name": "priority: high 🟠", 94 | "color": "ffaa66", 95 | "aliases": [ 96 | "important", 97 | "Issue priority: important" 98 | ] 99 | }, 100 | { 101 | "name": "priority: critical 🔴", 102 | "color": "ff6666", 103 | "aliases": [ 104 | "critical", 105 | "Issue priority: blocker" 106 | ] 107 | }, 108 | { 109 | "name": "good starter issue 🐣", 110 | "color": "bfe5bf", 111 | "aliases": [ 112 | "beginner-friendly", 113 | "beginner", 114 | "good-starter-issue", 115 | "starter-issue", 116 | "good first issue", 117 | "status: good starter issue 🐣" 118 | ] 119 | }, 120 | { 121 | "name": "help welcome 🙏", 122 | "color": "bfe5bf", 123 | "aliases": [ 124 | "help wanted", 125 | "status: help wanted 🙏" 126 | ] 127 | }, 128 | { 129 | "name": "status: wontfix 🙅‍♂️", 130 | "color": "dddddd", 131 | "aliases": [ 132 | "wontfix", 133 | "wont-fix", 134 | "Won't fix" 135 | ] 136 | }, 137 | { 138 | "name": "type: invalid ❌", 139 | "color": "ddeebb", 140 | "aliases": [ 141 | "invalid" 142 | ] 143 | }, 144 | { 145 | "name": "status: work in progress 🧰", 146 | "color": "dddddd", 147 | "aliases": [ 148 | "wip" 149 | ] 150 | }, 151 | { 152 | "name": "status: duplicate 👯‍♂️", 153 | "color": "dddddd", 154 | "aliases": [ 155 | "duplicate" 156 | ] 157 | }, 158 | { 159 | "name": "status: blocked 🛑", 160 | "color": "dddddd", 161 | "aliases": [ 162 | "blocked" 163 | ] 164 | }, 165 | { 166 | "name": "status: inactive 💤", 167 | "color": "dddddd", 168 | "aliases": [ 169 | "Inactive" 170 | ] 171 | }, 172 | { 173 | "name": "automerge 🤞", 174 | "color": "d93f0b", 175 | "aliases": [ 176 | "automerge" 177 | ] 178 | } 179 | ] --------------------------------------------------------------------------------