Add a script to auto-label issues

pull/4681/head^2
Kamran Ahmed 7 months ago
parent fbecabf3fa
commit 7c68830b45
  1. 1
      package.json
  2. 11
      scripts/create-roadmap-labels.sh

@ -9,6 +9,7 @@
"build": "astro build", "build": "astro build",
"preview": "astro preview", "preview": "astro preview",
"format": "prettier --write .", "format": "prettier --write .",
"gh-labels": "./scripts/create-roadmap-labels.sh",
"astro": "astro", "astro": "astro",
"deploy": "NODE_DEBUG=gh-pages gh-pages -d dist -t", "deploy": "NODE_DEBUG=gh-pages gh-pages -d dist -t",
"upgrade": "ncu -u", "upgrade": "ncu -u",

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# get all the folder names inside src/data/roadmaps
roadmap_ids=$(ls src/data/roadmaps)
# create a label for each roadmap name on github issues using gh cli
for roadmap_id in $roadmap_ids
do
random_color=$(openssl rand -hex 3)
gh label create "$roadmap_id" --color $random_color --description "Roadmap: $roadmap_id"
done
Loading…
Cancel
Save