mirror of
https://github.com/mshick/add-pr-comment.git
synced 2026-01-01 14:49:44 +11:00
trigger
This commit is contained in:
parent
93221a9073
commit
721815dc3c
1 changed files with 12 additions and 11 deletions
23
index.js
23
index.js
|
|
@ -9,19 +9,20 @@ async function run() {
|
||||||
core.debug(`Input message: ${msg}`);
|
core.debug(`Input message: ${msg}`);
|
||||||
|
|
||||||
const octokit = new github.GitHub(repoToken);
|
const octokit = new github.GitHub(repoToken);
|
||||||
const context = github.context;
|
const {
|
||||||
|
payload: {
|
||||||
|
pull_request: pullRequestPayload
|
||||||
|
// respository: repositoryPayload
|
||||||
|
}
|
||||||
|
} = github.context;
|
||||||
|
|
||||||
console.log(context);
|
const { data: pullRequest } = await octokit.pulls.get({
|
||||||
|
owner: "mshick",
|
||||||
|
repo: "add-pr-comment",
|
||||||
|
pull_number: pullRequestPayload.number
|
||||||
|
});
|
||||||
|
|
||||||
core.debug(context);
|
console.log(pullRequest);
|
||||||
|
|
||||||
// const { data: pullRequest } = await octokit.pulls.get({
|
|
||||||
// owner: "octokit",
|
|
||||||
// repo: "rest.js",
|
|
||||||
// pull_number: 123,
|
|
||||||
// });
|
|
||||||
|
|
||||||
// console.log(pullRequest);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue