@probot/adapter-github-actions
Version:
Adapter to run a Probot application function in GitHub Actions
21 lines (18 loc) • 564 B
JavaScript
import { relative } from "node:path";
/**
* @param {import('probot').Probot} app
*/
export default async function app(app) {
app.log.debug("This is a debug message");
app.log.info("This is an info message");
app.log.warn("This is a warning message");
app.on("push", async (context) => {
await context.octokit.request(
"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments",
context.repo({
commit_sha: context.payload.head_commit.id,
body: `Hello from ${relative(process.cwd(), __filename)}`,
})
);
});
}