style: nix fmt

This commit is contained in:
Defelo 2025-08-26 02:27:57 +02:00
commit 5a4df34f46
No known key found for this signature in database
GPG key ID: 2A05272471204DD3
3 changed files with 29 additions and 24 deletions

View file

@ -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

View file

@ -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

View file

@ -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 });