Update autolabeler to use environment variable for config

This commit is contained in:
CanbiZ
2025-09-18 12:01:42 +02:00
committed by GitHub
parent a0952e9f69
commit 76dcc45e9f

5
.github/workflows/autolabeler.yml generated vendored
View File

@@ -124,7 +124,7 @@ jobs:
- name: Load priority config
id: config
run: |
echo "priority=$(jq -c . .github/label-priority.json)" >> $GITHUB_OUTPUT
echo "PRIORITY_JSON=$(jq -c . .github/label-priority.json)" >> $GITHUB_ENV
- name: Fetch PR metadata
id: pr
@@ -192,7 +192,8 @@ jobs:
script: |
const raw = JSON.parse('${{ steps.ai.outputs.labels }}');
const prNumber = context.payload.pull_request.number;
const config = JSON.parse('${{ steps.config.outputs.priority }}');
const config = JSON.parse(process.env.PRIORITY_JSON);
console.log("Loaded priorities:", config.priorities);
let toApply = [];
let toSuggest = [];