mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-19 22:44:38 +00:00
🚨 ignore eslint
This commit is contained in:
parent
8291eeaa52
commit
d381d4286f
4 changed files with 13 additions and 7 deletions
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
|
|
@ -70,7 +70,9 @@ function findPreviousComment(octokit, repo, number, header) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`, Object.assign(Object.assign({}, repo), { after, number }));
|
`, Object.assign(Object.assign({}, repo), { after, number }));
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||||
const viewer = data.viewer;
|
const viewer = data.viewer;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||||
const repository = data.repository;
|
const repository = data.repository;
|
||||||
const target = (_c = (_b = (_a = repository.pullRequest) === null || _a === void 0 ? void 0 : _a.comments) === null || _b === void 0 ? void 0 : _b.nodes) === null || _c === void 0 ? void 0 : _c.find((node) => {
|
const target = (_c = (_b = (_a = repository.pullRequest) === null || _a === void 0 ? void 0 : _a.comments) === null || _b === void 0 ? void 0 : _b.nodes) === null || _c === void 0 ? void 0 : _c.find((node) => {
|
||||||
var _a, _b;
|
var _a, _b;
|
||||||
|
|
@ -94,7 +96,7 @@ function updateComment(octokit, id, body, header, previousBody) {
|
||||||
if (!body && !previousBody)
|
if (!body && !previousBody)
|
||||||
return core.warning("Comment body cannot be blank");
|
return core.warning("Comment body cannot be blank");
|
||||||
yield octokit.graphql(`
|
yield octokit.graphql(`
|
||||||
mutation($input: UpdateIssueCommentInput!) {
|
mutation($input: UpdateIssueCommentInput!) {
|
||||||
updateIssueComment(input: $input) {
|
updateIssueComment(input: $input) {
|
||||||
issueComment {
|
issueComment {
|
||||||
id
|
id
|
||||||
|
|
@ -126,7 +128,7 @@ exports.createComment = createComment;
|
||||||
function deleteComment(octokit, id) {
|
function deleteComment(octokit, id) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield octokit.graphql(`
|
yield octokit.graphql(`
|
||||||
mutation($id: ID!) {
|
mutation($id: ID!) {
|
||||||
deleteIssueComment(input: { id: $id }) {
|
deleteIssueComment(input: { id: $id }) {
|
||||||
clientMutationId
|
clientMutationId
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
6
lib/comment.js
generated
6
lib/comment.js
generated
|
|
@ -63,7 +63,9 @@ function findPreviousComment(octokit, repo, number, header) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`, Object.assign(Object.assign({}, repo), { after, number }));
|
`, Object.assign(Object.assign({}, repo), { after, number }));
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||||
const viewer = data.viewer;
|
const viewer = data.viewer;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||||
const repository = data.repository;
|
const repository = data.repository;
|
||||||
const target = (_c = (_b = (_a = repository.pullRequest) === null || _a === void 0 ? void 0 : _a.comments) === null || _b === void 0 ? void 0 : _b.nodes) === null || _c === void 0 ? void 0 : _c.find((node) => {
|
const target = (_c = (_b = (_a = repository.pullRequest) === null || _a === void 0 ? void 0 : _a.comments) === null || _b === void 0 ? void 0 : _b.nodes) === null || _c === void 0 ? void 0 : _c.find((node) => {
|
||||||
var _a, _b;
|
var _a, _b;
|
||||||
|
|
@ -87,7 +89,7 @@ function updateComment(octokit, id, body, header, previousBody) {
|
||||||
if (!body && !previousBody)
|
if (!body && !previousBody)
|
||||||
return core.warning("Comment body cannot be blank");
|
return core.warning("Comment body cannot be blank");
|
||||||
yield octokit.graphql(`
|
yield octokit.graphql(`
|
||||||
mutation($input: UpdateIssueCommentInput!) {
|
mutation($input: UpdateIssueCommentInput!) {
|
||||||
updateIssueComment(input: $input) {
|
updateIssueComment(input: $input) {
|
||||||
issueComment {
|
issueComment {
|
||||||
id
|
id
|
||||||
|
|
@ -119,7 +121,7 @@ exports.createComment = createComment;
|
||||||
function deleteComment(octokit, id) {
|
function deleteComment(octokit, id) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield octokit.graphql(`
|
yield octokit.graphql(`
|
||||||
mutation($id: ID!) {
|
mutation($id: ID!) {
|
||||||
deleteIssueComment(input: { id: $id }) {
|
deleteIssueComment(input: { id: $id }) {
|
||||||
clientMutationId
|
clientMutationId
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,9 @@ export async function findPreviousComment(
|
||||||
`,
|
`,
|
||||||
{...repo, after, number}
|
{...repo, after, number}
|
||||||
)
|
)
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||||
const viewer = data.viewer as User
|
const viewer = data.viewer as User
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||||
const repository = data.repository as Repository
|
const repository = data.repository as Repository
|
||||||
const target = repository.pullRequest?.comments?.nodes?.find(
|
const target = repository.pullRequest?.comments?.nodes?.find(
|
||||||
(node: IssueComment | null | undefined) =>
|
(node: IssueComment | null | undefined) =>
|
||||||
|
|
@ -75,7 +77,7 @@ export async function updateComment(
|
||||||
|
|
||||||
await octokit.graphql(
|
await octokit.graphql(
|
||||||
`
|
`
|
||||||
mutation($input: UpdateIssueCommentInput!) {
|
mutation($input: UpdateIssueCommentInput!) {
|
||||||
updateIssueComment(input: $input) {
|
updateIssueComment(input: $input) {
|
||||||
issueComment {
|
issueComment {
|
||||||
id
|
id
|
||||||
|
|
@ -122,7 +124,7 @@ export async function deleteComment(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
await octokit.graphql(
|
await octokit.graphql(
|
||||||
`
|
`
|
||||||
mutation($id: ID!) {
|
mutation($id: ID!) {
|
||||||
deleteIssueComment(input: { id: $id }) {
|
deleteIssueComment(input: { id: $id }) {
|
||||||
clientMutationId
|
clientMutationId
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue