Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: this action requires a pull request context to be able to comment https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request #45

Closed
lucassabreu opened this issue Nov 1, 2023 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@lucassabreu
Copy link
Owner

from @AnmolSaxenaVodafone at here


I am using the below step to generate a Clover report:

      # Generate Clover Report
      - name: Generate Clover Report
        uses: lucassabreu/comment-coverage-clover@main
        with:
          file: target/site/clover/clover.xml
          with-chart: false

After this commit, I have started getting below exception when I merge the change to the main branch:

Error: this action requires a pull request context to be able to comment
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request Stack: undefined
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Generate Clover Report

Can you advise if the Generate Clover Report step needs to be updated?

@lucassabreu lucassabreu added documentation Improvements or additions to documentation question Further information is requested labels Nov 1, 2023
@lucassabreu lucassabreu self-assigned this Nov 1, 2023
@lucassabreu
Copy link
Owner Author

hi @AnmolSaxenaVodafone

if you add this to the step the error will vanish: if: ${{ github.event_name == 'pull_request' }}.

i will update the example with this later.

just to explain, this message was added because same users were expecting comments on the commits through the push event and that is not supported yet.

so this message was supposed to alert them.

@AnmolSaxenaVodafone
Copy link

hi @AnmolSaxenaVodafone

if you add this to the step the error will vanish: if: ${{ github.event_name == 'pull_request' }}.

i will update the example with this later.

just to explain, this message was added because same users were expecting comments on the commits through the push event and that is not supported yet.

so this message was supposed to alert them.

Thanks @lucassabreu appreciate your quick attention.

@lucassabreu lucassabreu pinned this issue Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants