Closed maboloshi closed 4 months ago
Then build
Signed-off-by: $app_slug[bot] <$id+$app_slug[bot]@users.noreply.github.com>
.
that suggest you'd need the app ID as well? I'm not sure if the app ID or installation ID is needed for this to work. I know that for commits, you should use the installation ID, see this patch for example: https://github.com/octokit/core.js/commit/80c9bee698498ff3c14c95f5ac76d7f2d9d755bc.patch
29139614
is the installation ID. The app ID is 2740
I'm currently using the GitHub GRAPHQL api for commits, which automatically sets the author information using the account information corresponding to the token.
I currently want to build Signed-off-by
with reference to this format.
Request https://api.github.com/users/action-assistant[bot]
to get the following information. Where id
is the ID of the virtual account corresponding to the token
produced by the github app.
{
"login": "action-assistant[bot]",
"id": 152410706,
......
}
action-assistant
is the github app slug I got from the features added so far.
Then build
Signed-off-by: $app_slug[bot] <$id+$app_slug[bot]@users.noreply.github.com>
.that suggest you'd need the app ID as well? I'm not sure if the app ID or installation ID is needed for this to work. I know that for commits, you should use the installation ID, see this patch for example: https://github.com/octokit/core.js/commit/80c9bee698498ff3c14c95f5ac76d7f2d9d755bc.patch
29139614
is the installation ID. The app ID is 2740
Actually, 29139614
is not the installation ID of this app, but the account ID of the app's virtual account.
Request https://api.github.com/users/renovate[bot]
{
"login": "renovate[bot]",
"id": 29139614,
.....
}
The numbers in the "from" message in this patch are consistent.
From 80c9bee698498ff3c14c95f5ac76d7f2d9d755bc Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 16 Feb 2024 16:41:56 +0000
Subject: [PATCH] chore(deps): update dependency undici to v6.6.1 [security]
....
The name of the github app can be changed later, but it's always possible to get the latest github app's slug using the app id and private key.
I that's one of the reasons I didn't want to hardcode Signed-off-by
in my code.
So I hope that through this action, I can get the token and the slug of the app at the same time.
Actually,
29139614
is not the installation ID of this app, but the account ID of the app's virtual account.
you are right, that's it, today I learned: https://api.github.com/user/29139614
Cheers!
Yeah we can add app-slug
as output. I still want to add installation-id
as another output but if you don't need it we can add it later.
Can you get the tests fixed? It might be as simple as updating the snapshots with npx ava tests/index.js -u
On my end, the snapshot file generated using npx ava tests/index.js
has line breaks in the format \r\n
instead of \n
, and I'm guessing that after push
the github action for test
will still report an error.
Resolved Line Break Styles.
:tada: This PR is included in version 1.9.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
It is convenient to use
https://api.github.com/users/$app_slug[bot]
to obtain the corresponding account ID later. Then buildSigned-off-by: $app_slug[bot] <$id+$app_slug[bot]@users.noreply.github.com>
.Currently, there is no Linux environment to build test snapshot files