mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-03-13 14:30:15 +08:00
change octokit init to env variable
This commit is contained in:
parent
e187800569
commit
5bc77ce65e
2
dist/cleanup/index.js
generated
vendored
2
dist/cleanup/index.js
generated
vendored
@ -74911,7 +74911,7 @@ function createPRComment(content) {
|
||||
}
|
||||
const context = github.context;
|
||||
try {
|
||||
yield github.getOctokit(getGitHubToken()).rest.issues.createComment(Object.assign(Object.assign({}, context.repo), { issue_number: (_a = context.payload.pull_request) === null || _a === void 0 ? void 0 : _a.number, body: content }));
|
||||
yield new rest_1.Octokit({ auth: process.env.GITHUB_TOKEN }).rest.issues.createComment(Object.assign(Object.assign({}, context.repo), { issue_number: (_a = context.payload.pull_request) === null || _a === void 0 ? void 0 : _a.number, body: content }));
|
||||
}
|
||||
catch (err) {
|
||||
core.error(`Failed to create pull request comment. Please make sure this job has 'write' permissions for the 'pull-requests' scope (see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions)? Internal error: ${err}`);
|
||||
|
2
dist/main/index.js
generated
vendored
2
dist/main/index.js
generated
vendored
@ -75908,7 +75908,7 @@ function createPRComment(content) {
|
||||
}
|
||||
const context = github.context;
|
||||
try {
|
||||
yield github.getOctokit(getGitHubToken()).rest.issues.createComment(Object.assign(Object.assign({}, context.repo), { issue_number: (_a = context.payload.pull_request) === null || _a === void 0 ? void 0 : _a.number, body: content }));
|
||||
yield new rest_1.Octokit({ auth: process.env.GITHUB_TOKEN }).rest.issues.createComment(Object.assign(Object.assign({}, context.repo), { issue_number: (_a = context.payload.pull_request) === null || _a === void 0 ? void 0 : _a.number, body: content }));
|
||||
}
|
||||
catch (err) {
|
||||
core.error(`Failed to create pull request comment. Please make sure this job has 'write' permissions for the 'pull-requests' scope (see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions)? Internal error: ${err}`);
|
||||
|
@ -169,7 +169,7 @@ export async function createPRComment(content: string): Promise<void> {
|
||||
}
|
||||
const context = github.context
|
||||
try {
|
||||
await github.getOctokit(getGitHubToken()).rest.issues.createComment({
|
||||
await new Octokit({ auth: process.env.GITHUB_TOKEN }).rest.issues.createComment({
|
||||
...context.repo,
|
||||
issue_number: context.payload.pull_request?.number as number,
|
||||
body: content
|
||||
|
Loading…
x
Reference in New Issue
Block a user