Skip to content

[Bug]: Multiple coverage reports overwriting comments #50

@emmanuelsdias

Description

@emmanuelsdias

Just raising a nit bug (?) I found.

When using multiple coverage actions, based on #35, I'm passing a different storage-subdirectory so that the saved XML reports on diff-storage branch don't overwrite each other.

However, another hidden requirement for multiple actions is a different path, since it's used as the sticky comment's unique key (header):

coverage-action/action.yml

Lines 356 to 362 in 50449af

- name: Post as comment
if: contains(inputs.publish, 'true')
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ inputs.token }}
header: ${{ inputs.path }}
path: .coverage-output.final

It would be nice to either:

  1. Create a separate input to handle the stick comments unique keys; or
  2. Document on the path description that it's used as the sticky comment unique key; or
  3. Use storage-subdirectory as the unique key instead? Though it might fall into a similar problem we have with the current path hidden behavior, and may limit user shenanigans in case they want to have multiple actions overwriting each other's comments.

Sorry for the flood lately, no hurry here, as for now I can just pass different paths to the actions (which might be the intended way from the start).

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions