generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
890a301
commit b486bb5
Showing
2 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
import * as core from "@actions/core"; | ||
import * as github from "@actions/github"; | ||
import * as core from '@actions/core' | ||
import * as github from '@actions/github' | ||
import { Logger } from 'src/utils.js' | ||
|
||
export async function postComment(pullRequestNumber: number, summary: string) { | ||
const githubToken = core.getInput("token"); | ||
const octokit = github.getOctokit(githubToken); | ||
const repo = github.context.repo; | ||
const githubToken = core.getInput('token') | ||
const octokit = github.getOctokit(githubToken) | ||
const repo = github.context.repo | ||
Logger.log('posted comment', github.context) | ||
|
||
const { data } = await octokit.rest.pulls.update({ | ||
...repo, | ||
pull_number: pullRequestNumber, | ||
body: summary | ||
}); | ||
const { data } = await octokit.rest.pulls.update({ | ||
...repo, | ||
pull_number: pullRequestNumber, | ||
body: summary | ||
}) | ||
Logger.log('posted comment', data.body) | ||
} |