style: nix fmt
This commit is contained in:
parent
08d011b4a5
commit
5a4df34f46
3 changed files with 29 additions and 24 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
|
@ -26,7 +26,7 @@ on:
|
|||
type: choice
|
||||
default: yes_sandbox_true
|
||||
options:
|
||||
- 'no'
|
||||
- "no"
|
||||
- yes_sandbox_false
|
||||
- yes_sandbox_relaxed
|
||||
- yes_sandbox_true
|
||||
|
|
@ -36,7 +36,7 @@ on:
|
|||
type: choice
|
||||
default: yes_sandbox_true
|
||||
options:
|
||||
- 'no'
|
||||
- "no"
|
||||
- yes_sandbox_false
|
||||
- yes_sandbox_relaxed
|
||||
- yes_sandbox_true
|
||||
|
|
|
|||
4
.github/workflows/review.yml
vendored
4
.github/workflows/review.yml
vendored
|
|
@ -29,7 +29,7 @@ on:
|
|||
type: choice
|
||||
default: yes_sandbox_true
|
||||
options:
|
||||
- 'no'
|
||||
- "no"
|
||||
- yes_sandbox_false
|
||||
- yes_sandbox_relaxed
|
||||
- yes_sandbox_true
|
||||
|
|
@ -39,7 +39,7 @@ on:
|
|||
type: choice
|
||||
default: yes_sandbox_true
|
||||
options:
|
||||
- 'no'
|
||||
- "no"
|
||||
- yes_sandbox_false
|
||||
- yes_sandbox_relaxed
|
||||
- yes_sandbox_true
|
||||
|
|
|
|||
25
shortcut.js
25
shortcut.js
|
|
@ -40,15 +40,20 @@ const query = async (doc, sel) => {
|
|||
|
||||
const getPrDetails = pr => {
|
||||
const title = document.querySelector("bdi.js-issue-title.markdown-title").innerText;
|
||||
const commits = [...document.querySelectorAll(".TimelineItem-body a.markdown-title[href*='/commits/']")]
|
||||
.flatMap(({ title, href }) => {
|
||||
const commits = [...document.querySelectorAll(".TimelineItem-body a.markdown-title[href*='/commits/']")].flatMap(
|
||||
({ title, href }) => {
|
||||
const match = /\/NixOS\/nixpkgs\/pull\/(\d+)\/commits\/([0-9a-f]+)$/i.exec(href);
|
||||
return (match === null || match[1] !== pr) ? [] : [{
|
||||
return match === null || match[1] !== pr
|
||||
? []
|
||||
: [
|
||||
{
|
||||
commit_id: match[2],
|
||||
subject: title.split("\n")[0],
|
||||
description: title,
|
||||
}];
|
||||
});
|
||||
},
|
||||
];
|
||||
},
|
||||
);
|
||||
const labels = [...document.querySelectorAll("div.js-issue-labels > a")].map(x => x.innerText);
|
||||
const author = document.querySelector(".js-discussion > :first-child a.author").href.split("/").at(-1);
|
||||
const self = document.querySelector("div.AppHeader-user button[data-login]").getAttribute("data-login");
|
||||
|
|
@ -61,7 +66,9 @@ const getPrDetails = pr => {
|
|||
};
|
||||
|
||||
const setupActionsPage = async () => {
|
||||
const match = /^https:\/\/github.com\/([^/]+\/[^/]+)\/actions\/workflows\/review.yml#dispatch:(.*)$/.exec(location.href);
|
||||
const match = /^https:\/\/github.com\/([^/]+\/[^/]+)\/actions\/workflows\/review.yml#dispatch:(.*)$/.exec(
|
||||
location.href,
|
||||
);
|
||||
if (match === null || match[1] !== repo) return;
|
||||
|
||||
const inputs = new URLSearchParams(match[2]);
|
||||
|
|
@ -99,9 +106,7 @@ const setupActionsPage = async () => {
|
|||
const branch = inputs.get("branch");
|
||||
if (branch) await setBranch(branch);
|
||||
|
||||
[...inputs]
|
||||
.filter(([name]) => name !== "branch")
|
||||
.forEach(([name, value]) => setInput(name, value));
|
||||
[...inputs].filter(([name]) => name !== "branch").forEach(([name, value]) => setInput(name, value));
|
||||
|
||||
document.querySelector("details .workflow-dispatch button[type=submit]").focus();
|
||||
};
|
||||
|
|
@ -140,7 +145,7 @@ const setupPrPage = async () => {
|
|||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
new MutationObserver(setupPrPage).observe(document, { subtree: true, childList: true });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue