mirror of
https://github.com/mshick/add-pr-comment.git
synced 2025-12-31 14:20:32 +11:00
28 lines
625 B
JavaScript
28 lines
625 B
JavaScript
const core = require("@actions/core");
|
|
// const github = require("@actions/github");
|
|
|
|
async function run() {
|
|
try {
|
|
const msg = core.getInput("msg");
|
|
const repoToken = core.getInput("repo-token");
|
|
|
|
core.debug(`Input message: ${msg}`);
|
|
|
|
const octokit = new github.GitHub(repoToken);
|
|
const context = github.context;
|
|
|
|
core.debug(context);
|
|
|
|
// const { data: pullRequest } = await octokit.pulls.get({
|
|
// owner: "octokit",
|
|
// repo: "rest.js",
|
|
// pull_number: 123,
|
|
// });
|
|
//
|
|
// console.log(pullRequest);
|
|
} catch (error) {
|
|
core.setFailed(error.message);
|
|
}
|
|
}
|
|
|
|
run();
|