mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-14 12:31:14 +00:00
๐ use warning
This commit is contained in:
parent
a59ab1c422
commit
a57b4690ec
4 changed files with 4 additions and 7 deletions
3
dist/index.js
generated
vendored
3
dist/index.js
generated
vendored
|
|
@ -70,12 +70,11 @@ function findPreviousComment(octokit, repo, number, header) {
|
|||
}
|
||||
}
|
||||
`, Object.assign(Object.assign({}, repo), { after, number }));
|
||||
core.warning(JSON.stringify(data));
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
const viewer = data.viewer;
|
||||
core.debug(viewer.login);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
const repository = data.repository;
|
||||
core.debug(JSON.stringify(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) => {
|
||||
var _a, _b;
|
||||
return ((_a = node === null || node === void 0 ? void 0 : node.author) === null || _a === void 0 ? void 0 : _a.login) === viewer.login &&
|
||||
|
|
|
|||
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
3
lib/comment.js
generated
3
lib/comment.js
generated
|
|
@ -63,12 +63,11 @@ function findPreviousComment(octokit, repo, number, header) {
|
|||
}
|
||||
}
|
||||
`, Object.assign(Object.assign({}, repo), { after, number }));
|
||||
core.warning(JSON.stringify(data));
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
const viewer = data.viewer;
|
||||
core.debug(viewer.login);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
const repository = data.repository;
|
||||
core.debug(JSON.stringify(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) => {
|
||||
var _a, _b;
|
||||
return ((_a = node === null || node === void 0 ? void 0 : node.author) === null || _a === void 0 ? void 0 : _a.login) === viewer.login &&
|
||||
|
|
|
|||
|
|
@ -45,12 +45,11 @@ export async function findPreviousComment(
|
|||
`,
|
||||
{...repo, after, number}
|
||||
)
|
||||
core.warning(JSON.stringify(data))
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
const viewer = data.viewer as User
|
||||
core.debug(viewer.login)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
const repository = data.repository as Repository
|
||||
core.debug(JSON.stringify(repository))
|
||||
const target = repository.pullRequest?.comments?.nodes?.find(
|
||||
(node: IssueComment | null | undefined) =>
|
||||
node?.author?.login === viewer.login &&
|
||||
|
|
|
|||
Loadingโฆ
Reference in a new issue