Skip to content

Instantly share code, notes, and snippets.

View SakuraKoi's full-sized avatar
✔️
Verified by Github

SakuraKooi SakuraKoi

✔️
Verified by Github
View GitHub Profile
@SakuraKoi
SakuraKoi / github-export-labels.js
Last active January 3, 2021 14:10 — forked from douglascayers/github-export-labels.js
Export and import GitHub labels between projects by running JavaScript in the browser console to automate clicks.
/**
* Inspired by @MoOx original script: https://gist.github.com/MoOx/93c2853fee760f42d97f
* Adds file download per @micalevisk https://gist.github.com/MoOx/93c2853fee760f42d97f#gistcomment-2660220
* Fixed color parsing @SakuraKooi
*
* Changes include:
* - Get the description from the `title` attribute instead of `aria-label` (doesn't exist anymore)
* - Use style.backgroundColor and parse the rgb(...) to hex (rather than regex parsing of 'style' string)
* - Downloads labels to a JSON file named after the webpage to know which GitHub repo they came from.
*