MCPcopy Create free account
hub / github.com/dflook/terraform-github-actions / hide_comment

Function hide_comment

image/src/github_pr_comment/comment.py:387–410  ·  view source on GitHub ↗
(
        github: GithubApi,
        comment: TerraformComment,
        classifier: str
)

Source from the content-addressed store, hash-verified

385 return new_comment
386
387def hide_comment(
388 github: GithubApi,
389 comment: TerraformComment,
390 classifier: str
391) -> None:
392
393 if comment.node_id is None:
394 debug('Comment has unknown node_id - not hiding')
395 return
396
397 graphql_url = os.environ.get('GITHUB_GRAPHQL_URL', f'{os.environ["GITHUB_API_URL"]}/graphql')
398
399 response = github.post(
400 graphql_url, json={
401 'query': '''
402 mutation {
403 minimizeComment(input: {subjectId: "''' + comment.node_id + '''", classifier: ''' + classifier + '''}) {
404 clientMutationId
405 }
406 }
407 '''
408 }
409 )
410 debug(f'graphql response: {response.content}')

Callers 1

mainFunction · 0.90

Calls 3

debugFunction · 0.90
getMethod · 0.45
postMethod · 0.45

Tested by

no test coverage detected