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:
parent
8988a069a6
commit
e3c949b637
4 changed files with 13 additions and 7 deletions
5
.github/workflows/scripts/pr_labeler.js
vendored
5
.github/workflows/scripts/pr_labeler.js
vendored
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue