ci/github-script/prepare: determine changed files

This commit is contained in:
Wolfgang Walther
2025-08-18 21:56:02 +02:00
parent 4220a03df8
commit 46a1b0a7bc
2 changed files with 12 additions and 15 deletions

View File

@@ -68,6 +68,17 @@ module.exports = async ({ github, context, core }) => {
core.setOutput('head', headClassification)
core.info('head classification:', headClassification)
const files = (
await github.paginate(github.rest.pulls.listFiles, {
...context.repo,
pull_number: context.payload.pull_request.number,
per_page: 100,
})
).map((file) => file.filename)
if (files.includes('ci/pinned.json')) core.setOutput('touched', ['pinned'])
else core.setOutput('touched', [])
return
}
throw new Error(