mirror of
https://github.com/mshick/add-pr-comment.git
synced 2025-12-31 14:20:32 +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}`);
|
||||
|
||||
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);
|
||||
|
||||
// const { data: pullRequest } = await octokit.pulls.get({
|
||||
// owner: "octokit",
|
||||
// repo: "rest.js",
|
||||
// pull_number: 123,
|
||||
// });
|
||||
|
||||
// console.log(pullRequest);
|
||||
console.log(pullRequest);
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue