Skip to content

Commit

Permalink
update thread-comments default value to false #46 (#47)
Browse files Browse the repository at this point in the history
* change thread-comments default value to false #46
* remove use of TOKEN when fetching thread comments
This should resolve #46. It will not affect the fix for private repos since thread comments are now auto-disabled for private repos.

Co-authored-by: Brendan <[email protected]>
  • Loading branch information
shenxianpeng and 2bndy5 authored Apr 5, 2022
1 parent f4c83ba commit c33e41d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
- **Description**: Set this option to false to disable the use of thread comments as feedback.
- To use thread comments, the `GITHUB_TOKEN` (provided by Github to each repository) must be declared as an environment
variable. See [Authenticating with the GITHUB_TOKEN](https://docs.github.com/en/actions/reference/authentication-in-a-workflow)
- Default: true
- Default: false
- NOTE: If run on a private repository, then this feature is disabled because the GitHub REST API behaves differently for thread comments on a private repository.

#### `database`
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
thread-comments:
description: Set this option to false to disable the use of thread comments as feedback. Defaults to true.
required: false
default: true
default: false
style:
description: >
The style rules to use (defaults to 'llvm').
Expand Down Expand Up @@ -37,7 +37,7 @@ inputs:
required: false
default: "10"
verbosity:
descruption: A hidden option to control the action's log verbosity. This is the `logging` level (degaults to DEBUG)
description: A hidden option to control the action's log verbosity. This is the `logging` level (degaults to DEBUG)
required: false
default: "10"
lines-changed-only:
Expand Down
2 changes: 1 addition & 1 deletion cpp_linter/thread_comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def remove_bot_comments(comments_url: str, user_id: int):
user_id: The user's account id number.
"""
logger.info("comments_url: %s", comments_url)
Globals.response_buffer = requests.get(comments_url, headers=API_HEADERS)
Globals.response_buffer = requests.get(comments_url)
if not log_response_msg():
return # error getting comments for the thread; stop here
comments = Globals.response_buffer.json()
Expand Down

0 comments on commit c33e41d

Please sign in to comment.