github-actions-report-lcov icon indicating copy to clipboard operation
github-actions-report-lcov copied to clipboard

Support custom Pull Request number

Open jhen0409 opened this issue 2 years ago • 3 comments

In our case, we have to handle every push on the PR instead of pull_request.

This PR adds pr-number, so we can do like the following workflow:

name: CI
on: [push]
jobs:
  test:
    runs-on: ubuntu-18.04
    steps:
      - ......

      - uses: jwalton/gh-find-current-pr@v1
        id: findPR
        with:
          state: open

      - uses: kanga333/[email protected]
        name: Hide outdated bot comments
        if: success() && steps.findPR.outputs.number
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          issue_number: ${{ steps.findPR.outputs.number }}

      - name: Report code coverage
        uses: jhen0409/github-actions-report-lcov@main
        if: success() && steps.findPr.outputs.number
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          coverage-files: ./coverage/lcov.info
          artifact-name: coverage-root
          pr-number: ${{ steps.findPR.outputs.number }}

Or we might be able to use it with workflow_dispatch.

jhen0409 avatar Jun 16 '22 08:06 jhen0409

Thanks for this! Please update the readme further. "Number of the Pull Request. Optional." is vague and doesn't explain why someone would want to set this input.

zgosalvez avatar Jul 31 '22 03:07 zgosalvez

Thanks for the update. I'll keep this open since, upon review, it is closely related to #22 and #25

zgosalvez avatar Jul 31 '22 07:07 zgosalvez

Hi @jhen0409! Thank you again for this. I've made some modifications that I'd like you to test before we merge to main.

zgosalvez avatar Nov 27 '22 10:11 zgosalvez