mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2026-04-15 18:45:43 +00:00
style: ๐ lint error
This commit is contained in:
parent
7874cc39cf
commit
6ee941ecc7
6 changed files with 154 additions and 155 deletions
14
src/main.ts
14
src/main.ts
|
|
@ -1,11 +1,11 @@
|
|||
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 {
|
||||
findPreviousComment,
|
||||
createComment,
|
||||
updateComment,
|
||||
deleteComment
|
||||
} from './comment'
|
||||
} from "./comment"
|
||||
import {
|
||||
pullRequestNumber,
|
||||
repo,
|
||||
|
|
@ -15,21 +15,21 @@ import {
|
|||
recreate,
|
||||
deleteOldComment,
|
||||
githubToken
|
||||
} from './config'
|
||||
} from "./config"
|
||||
|
||||
async function run(): Promise<undefined> {
|
||||
if (isNaN(pullRequestNumber) || pullRequestNumber < 1) {
|
||||
core.info('no pull request numbers given: skip step')
|
||||
core.info("no pull request numbers given: skip step")
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
if (!deleteOldComment && !body) {
|
||||
throw new Error('Either message or path input is required')
|
||||
throw new Error("Either message or path input is required")
|
||||
}
|
||||
|
||||
if (deleteOldComment && recreate) {
|
||||
throw new Error('delete and recreate cannot be both set to true')
|
||||
throw new Error("delete and recreate cannot be both set to true")
|
||||
}
|
||||
|
||||
const octokit = github.getOctokit(githubToken)
|
||||
|
|
|
|||
Loadingโฆ
Add table
Add a link
Reference in a new issue