Skip to content

Commit

Permalink
solution for #151 (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 authored May 21, 2023
1 parent 1045e02 commit 5aa2227
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,20 @@ jobs:

#### `thread-comments`

- **Description**: Set this option to false to disable the use of thread comments as feedback.
- **Description**: Set this option to true to enable 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: 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.

#### `step-summary`

- **Description**: Set this option to true to append content as part of workflow's job summary.
- See implementation details in GitHub's documentation about
[Adding a job summary](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary).
This option is independent of the `thread-comments` option, rather this option uses the same content that the `thread-comments` option would use.
- Default: false

#### `file-annotations`

- **Description**: Set this option to false to disable the use of file annotations as feedback.
Expand Down
13 changes: 12 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ branding:
color: "green"
inputs:
thread-comments:
description: Set this option to false to disable the use of thread comments as feedback. Defaults to false.
description: Set this option to true to enable the use of thread comments as feedback. Defaults to false.
required: false
default: false
step-summary:
description: >
Set this option to true to append content as part of workflow's job summary. Defaults to false.
See implementation details in GitHub's documentation about
[Adding a job summary](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary).
This option is independent of the `thread-comments` option, rather this option uses the same content that
the `thread-comments` option would use.
required: false
default: false
file-annotations:
Expand Down Expand Up @@ -124,6 +134,7 @@ runs:
--lines-changed-only=${{ inputs.lines-changed-only }} \
--files-changed-only=${{ inputs.files-changed-only }} \
--thread-comments=${{ inputs.thread-comments }} \
--step-summary=${{ inputs.step-summary }} \
--ignore="${{ inputs.ignore }}" \
--database=${{ inputs.database }} \
--file-annotations=${{ inputs.file-annotations }} \
Expand Down
Binary file modified docs/images/comment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 5aa2227

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format reports: 2 file(s) not formatted
  • demo/demo.cpp
  • demo/demo.hpp
clang-tidy reports: 7 concern(s)
  • demo/demo.cpp

    /demo/demo.cpp:3:10: error: [clang-diagnostic-error]

    'stdio.h' file not found

    #include <stdio.h>
             ^

    /demo/demo.cpp:3:10: warning: [modernize-deprecated-headers]

    inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead

    #include <stdio.h>
             ^~~~~~~~~
             <cstdio>

    /demo/demo.cpp:8:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

    int main(){
    ~~~ ^
    auto       -> int

    /demo/demo.cpp:10:13: warning: [readability-braces-around-statements]

    statement should be inside braces

        for (;;) break;
                ^
                 {
  • demo/demo.hpp

    /demo/demo.hpp:6:11: warning: [modernize-use-default-member-init]

    use default member initializer for 'useless'

        char* useless;
              ^
                     {"\0"}

    /demo/demo.hpp:7:9: warning: [modernize-use-default-member-init]

    use default member initializer for 'numb'

        int numb;
            ^
                {0}

    /demo/demo.hpp:11:11: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

        void *not_useful(char *str){useless = str;}
        ~~~~~~^
        auto                        -> void *

Have any feedback or feature suggestions? Share it here.

Please sign in to comment.