feat(outputs): app-slug and installation-id (#105)

It is convenient to use `https://api.github.com/users/$app_slug[bot]` to
obtain the corresponding account ID later.
Then build `Signed-off-by: $app_slug[bot]
<$id+$app_slug[bot]@users.noreply.github.com>`.

Currently, there is no Linux environment to build test snapshot files
This commit is contained in:
沙漠之子
2024-03-01 19:18:38 +00:00
committed by GitHub
parent bf627a5a44
commit babaff4320
13 changed files with 98 additions and 28 deletions
@@ -7,6 +7,7 @@ await test((mockPool) => {
const owner = process.env.INPUT_OWNER;
const repo = process.env.INPUT_REPOSITORIES;
const mockInstallationId = "123456";
const mockAppSlug = "github-actions";
mockPool
.intercept({
@@ -32,7 +33,7 @@ await test((mockPool) => {
})
.reply(
200,
{ id: mockInstallationId },
{ id: mockInstallationId, "app_slug": mockAppSlug },
{ headers: { "content-type": "application/json" } }
);
});