This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const get_issue_branch = () => { | |
const number = document.querySelector("h1.gh-header-title span").textContent; | |
const title = document.querySelector("h1.gh-header-title .js-issue-title").textContent; | |
return `${number.substring(1)}-${title.toLowerCase().replaceAll(" ", "-").replaceAll(/[^-a-z]/g, "")}`; | |
}; | |
const get_pull_request_branch = () => document.querySelector(".commit-ref.head-ref a span").textContent; | |
const copyBranchName = () => { | |
if (window.location.host !== "github.com") return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The array of issues is copied to your clipboard. Paste it somewhere before you copy the `github-labels-import.js` file content. | |
* | |
* Run this script on the https://github.com/OWNER/REPO/labels page. | |
*/ | |
const convertRgbaToHex = (rgba) => { | |
// Match the values in the parentheses | |
const match = rgba.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)/); | |
if (!match) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* **Takeaways** | |
* Share test utilities | |
* Use a lint rule when people don't follow best practices | |
* Not sure this is worth the effort for us | |
* It's easy to start writing tests, it's hard to continuously maintain tests and consistently keep coverage high | |
* How do you test a module? | |
* In isolation | |
* With integrations | |
* Mock integrations | |
* Test app but mock external dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
# Re-usable blocks to reduce boilerplate | |
# in job definitions. | |
references: | |
container_config: &container_config | |
docker: | |
- image: my-company/circleci:gcloud # We use a custom Alpine Linux base image with the bare minimum | |
working_directory: /tmp/workspace | |
restore_repo: &restore_repo |