7b1d2aef87
Fixes #57 This PR implements the 3-step plan proposed by @gr2m in https://github.com/actions/create-github-app-token/issues/57#issuecomment-1751272252: > 1. Support both input types > 2. Log a deprecation warning for the old notation > 3. Add a test for deprecations Although this PR supports both input formats simultaneously, I opted _not_ to document the old format in the updated README. That’s a decision I’m happy to revisit, if y’all would prefer to have documentation for both the old and new formats.
17 lines
391 B
JavaScript
17 lines
391 B
JavaScript
import { readFileSync } from "node:fs";
|
|
import * as url from "node:url";
|
|
import YAML from "yaml";
|
|
|
|
const action = YAML.parse(
|
|
readFileSync(
|
|
url.fileURLToPath(new URL("../action.yml", import.meta.url)),
|
|
"utf8"
|
|
)
|
|
);
|
|
|
|
for (const [key, value] of Object.entries(action.inputs)) {
|
|
if ("deprecationMessage" in value) {
|
|
console.log(`${key} — ${value.deprecationMessage}`);
|
|
}
|
|
}
|