mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-08 10:47:42 +02:00
Remove redundant question marks (#10109)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -154,7 +154,7 @@ export class CommentSyncManager implements DocSyncManager {
|
||||
}
|
||||
}`
|
||||
if (isGHWriteAllowed()) {
|
||||
await okit?.graphql(q, {
|
||||
await okit.graphql(q, {
|
||||
commentID: id
|
||||
})
|
||||
}
|
||||
@@ -353,7 +353,7 @@ export class CommentSyncManager implements DocSyncManager {
|
||||
const okit = (await this.provider.getOctokit(ctx, existing.modifiedBy)) ?? container.container.octokit
|
||||
const mdown = await this.provider.getMarkdown(existingComment.message)
|
||||
if (mdown.trim().length > 0) {
|
||||
await okit?.rest.issues.updateComment({
|
||||
await okit.rest.issues.updateComment({
|
||||
owner: repository.owner?.login as string,
|
||||
repo: repository.name,
|
||||
issue_number: parent.githubNumber,
|
||||
@@ -429,7 +429,7 @@ export class CommentSyncManager implements DocSyncManager {
|
||||
try {
|
||||
const mdown = await this.provider.getMarkdown(chatMessage.message)
|
||||
if (mdown.trim().length > 0) {
|
||||
const result = await okit?.rest.issues.createComment({
|
||||
const result = await okit.rest.issues.createComment({
|
||||
owner: repo.owner?.login as string,
|
||||
repo: repo.name,
|
||||
issue_number: parent.githubNumber,
|
||||
|
||||
@@ -135,7 +135,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
|
||||
if (event.action !== 'deleted') {
|
||||
try {
|
||||
const response: any = await ctx.with('graphql', {}, (ctx) =>
|
||||
integration.octokit?.graphql(
|
||||
integration.octokit.graphql(
|
||||
`query listIssue($name: String!, $owner: String!, $issue: Int!) {
|
||||
repository(name: $name, owner: $owner) {
|
||||
issue(number: $issue) {
|
||||
@@ -624,7 +624,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
|
||||
// We should allow modification from user.
|
||||
|
||||
const closeIssue = async (): Promise<void> => {
|
||||
await okit?.graphql(
|
||||
await okit.graphql(
|
||||
`
|
||||
mutation closeIssue($issue: ID!) {
|
||||
closeIssue(input: {
|
||||
@@ -642,7 +642,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
|
||||
}
|
||||
|
||||
const reopenIssue = async (): Promise<void> => {
|
||||
await okit?.graphql(
|
||||
await okit.graphql(
|
||||
`
|
||||
mutation reopenIssue($issue: ID!) {
|
||||
reopenIssue(input: {
|
||||
@@ -675,7 +675,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
|
||||
// We need to call re-open issue
|
||||
await reopenIssue()
|
||||
}
|
||||
await okit?.graphql(
|
||||
await okit.graphql(
|
||||
`
|
||||
mutation updateIssue($issue: ID!, $body: String! ) {
|
||||
updateIssue(input: {
|
||||
@@ -713,7 +713,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
|
||||
await reopenIssue()
|
||||
}
|
||||
if (hasOtherChanges) {
|
||||
await okit?.graphql(
|
||||
await okit.graphql(
|
||||
`
|
||||
mutation updateIssue($issue: ID!) {
|
||||
updateIssue(input: {
|
||||
@@ -780,7 +780,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
|
||||
issue: IssueExternalData
|
||||
}
|
||||
}
|
||||
| undefined = await okit?.graphql(q, {
|
||||
| undefined = await okit.graphql(q, {
|
||||
repo: repoId,
|
||||
title: existingIssue.title,
|
||||
body,
|
||||
@@ -809,7 +809,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
|
||||
}
|
||||
}`
|
||||
if (isGHWriteAllowed()) {
|
||||
await okit?.graphql(q, {
|
||||
await okit.graphql(q, {
|
||||
issueID: id
|
||||
})
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ export class PullRequestSyncManager extends IssueSyncManagerBase implements DocS
|
||||
let externalData: PullRequestExternalData
|
||||
try {
|
||||
const response: any = await ctx.with('graphql', {}, (ctx) =>
|
||||
integration.octokit?.graphql(
|
||||
integration.octokit.graphql(
|
||||
`query listIssue($name: String!, $owner: String!, $issue: Int!) {
|
||||
repository(name: $name, owner: $owner) {
|
||||
pullRequest(number: $issue) {
|
||||
@@ -1000,7 +1000,7 @@ export class PullRequestSyncManager extends IssueSyncManagerBase implements DocS
|
||||
workspace: this.provider.getWorkspaceId()
|
||||
})
|
||||
if (isGHWriteAllowed()) {
|
||||
await okit?.graphql(
|
||||
await okit.graphql(
|
||||
`
|
||||
mutation updatePullRequest($issue: ID!, $body: String!) {
|
||||
updatePullRequest(input: {
|
||||
@@ -1034,7 +1034,7 @@ export class PullRequestSyncManager extends IssueSyncManagerBase implements DocS
|
||||
workspace: this.provider.getWorkspaceId()
|
||||
})
|
||||
if (isGHWriteAllowed()) {
|
||||
await okit?.graphql(
|
||||
await okit.graphql(
|
||||
`
|
||||
mutation updatePullRequest($issue: ID!) {
|
||||
updatePullRequest(input: {
|
||||
|
||||
@@ -166,7 +166,7 @@ export class ReviewCommentSyncManager implements DocSyncManager {
|
||||
}
|
||||
}`
|
||||
if (isGHWriteAllowed()) {
|
||||
await okit?.graphql(q, {
|
||||
await okit.graphql(q, {
|
||||
reviewID: id
|
||||
})
|
||||
}
|
||||
@@ -187,7 +187,7 @@ export class ReviewCommentSyncManager implements DocSyncManager {
|
||||
|
||||
let externalData: ReviewCommentExternalData
|
||||
try {
|
||||
const response: any = await integration.octokit?.graphql(
|
||||
const response: any = await integration.octokit.graphql(
|
||||
`
|
||||
query listReview($reviewID: ID!) {
|
||||
node(id: $reviewID) {
|
||||
@@ -445,7 +445,7 @@ export class ReviewCommentSyncManager implements DocSyncManager {
|
||||
}
|
||||
}`
|
||||
if (isGHWriteAllowed()) {
|
||||
await okit?.graphql(q, {
|
||||
await okit.graphql(q, {
|
||||
threadID: reviewComment.id,
|
||||
body
|
||||
})
|
||||
@@ -532,7 +532,7 @@ export class ReviewCommentSyncManager implements DocSyncManager {
|
||||
comment: ReviewCommentExternalData
|
||||
}
|
||||
}
|
||||
| undefined = await okit?.graphql(q, {
|
||||
| undefined = await okit.graphql(q, {
|
||||
prID: existingReview.reviewThreadId,
|
||||
body: (await this.provider.getMarkdown(existingReview.body)) ?? ''
|
||||
})
|
||||
|
||||
@@ -181,7 +181,7 @@ export class ReviewThreadSyncManager implements DocSyncManager {
|
||||
|
||||
let externalData: ReviewThreadExternalData
|
||||
try {
|
||||
const response: any = await integration.octokit?.graphql(
|
||||
const response: any = await integration.octokit.graphql(
|
||||
`
|
||||
query listReview($reviewID: ID!) {
|
||||
node(id: $reviewID) {
|
||||
@@ -385,7 +385,7 @@ export class ReviewThreadSyncManager implements DocSyncManager {
|
||||
}`
|
||||
try {
|
||||
if (isGHWriteAllowed()) {
|
||||
await okit?.graphql(q, {
|
||||
await okit.graphql(q, {
|
||||
threadID: review.id
|
||||
})
|
||||
}
|
||||
@@ -474,7 +474,7 @@ export class ReviewThreadSyncManager implements DocSyncManager {
|
||||
thread: ReviewThreadExternalData
|
||||
}
|
||||
}
|
||||
| undefined = await okit?.graphql(q, {
|
||||
| undefined = await okit.graphql(q, {
|
||||
prID: (parent.external as PullRequestExternalData).id,
|
||||
body: EmptyMarkup // TODO: Need to replace with first comment on comment sync.
|
||||
})
|
||||
|
||||
@@ -161,7 +161,7 @@ export class ReviewSyncManager implements DocSyncManager {
|
||||
}
|
||||
}`
|
||||
if (isGHWriteAllowed()) {
|
||||
await okit?.graphql(q, {
|
||||
await okit.graphql(q, {
|
||||
reviewID: id
|
||||
})
|
||||
}
|
||||
@@ -178,7 +178,7 @@ export class ReviewSyncManager implements DocSyncManager {
|
||||
|
||||
let externalData: ReviewExternalData
|
||||
try {
|
||||
const response: any = await integration.octokit?.graphql(
|
||||
const response: any = await integration.octokit.graphql(
|
||||
`
|
||||
query listReview($reviewID: ID!) {
|
||||
node(id: $reviewID) {
|
||||
@@ -456,7 +456,7 @@ export class ReviewSyncManager implements DocSyncManager {
|
||||
pullRequestReview: ReviewExternalData
|
||||
}
|
||||
}
|
||||
| undefined = await okit?.graphql(q, {
|
||||
| undefined = await okit.graphql(q, {
|
||||
prID: (parent.external as PullRequestExternalData).id,
|
||||
body: (await this.provider.getMarkdown(existingReview.body)) ?? '',
|
||||
state: existingReview.state
|
||||
|
||||
Reference in New Issue
Block a user