fix(workflow): align first-interaction input keys (#821)

* fix(workflow): use valid first-interaction input keys

* fix(workflows): wire shared label policy path in label jobs
This commit is contained in:
Chummy 2026-02-18 22:24:51 +08:00 committed by GitHub
parent 8988a069a6
commit e3c949b637
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 7 deletions

View file

@ -22,6 +22,7 @@ if ((action === "labeled" || action === "unlabeled") && !managedEnforcedLabels.h
}
async function loadContributorTierPolicy() {
const policyPath = process.env.LABEL_POLICY_PATH || ".github/label-policy.json";
const fallback = {
contributorTierColor: "2ED9FF",
contributorTierRules: [
@ -35,7 +36,7 @@ async function loadContributorTierPolicy() {
const { data } = await github.rest.repos.getContent({
owner,
repo,
path: ".github/label-policy.json",
path: policyPath,
ref: context.payload.repository?.default_branch || "main",
});
const json = JSON.parse(Buffer.from(data.content, "base64").toString("utf8"));
@ -49,7 +50,7 @@ async function loadContributorTierPolicy() {
}
return { contributorTierColor, contributorTierRules };
} catch (error) {
core.warning(`failed to load .github/label-policy.json, using fallback policy: ${error.message}`);
core.warning(`failed to load ${policyPath}, using fallback policy: ${error.message}`);
return fallback;
}
}