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
#!/bin/bash | |
## | |
## Lists and optionally merges only Dependabot PRs in a given GitHub repo. | |
## | |
## Published at: https://gist.github.com/stefcameron/527108410e01dadd58aad81232366902 | |
## | |
## Version history: | |
## | |
## - 2024/04/04+1527: Update show_help() to use easier syntax. |
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
/** | |
* [ASYNC] Waits for every promise to either resolve or reject, which is different | |
* from `Promise.all()` which rejects on the first rejection __without waiting | |
* for other promises to settle__. | |
* @param {Array<Promise>} promises | |
* @returns {Promise<{ results: Array, errors: Array}>} An object where `results` | |
* are the settled values of all resolved promises, in the order in which they | |
* appeared in `promises` (but not necessarily sequential if there were rejections), | |
* and `errors` are the settled values of all rejected promises, in the order | |
* in which they appeared in `promises` (again, not necessarily sequential). |
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
/** | |
* Copy the specified string to the clipboard. | |
* @param {string} text The text to copy. | |
* @returns {boolean} `true` if the copy succeeded; `false` if an | |
* error occurred copying the text to the clipboard. | |
*/ | |
export const copyToClipboard = (text) => { | |
try { | |
// NOTE: a field is required to execute the document's 'copy' command; | |
// make sure the first appears offscreen without affecting layout |