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

[Feature Request] Ability to turn off commenting on pull requests #76

Open
anton-buyskikh opened this issue Nov 25, 2022 · 4 comments
Open

Comments

@anton-buyskikh
Copy link

It would be nice to have a flag such as post_on_pr: true/false, which would toggle this option on/off.
The report should be generated in either case and be accessible via the Actions tab, but not posted to the PR discussion thread if desired.

Reasons:

  • These comments draw unnecessary attention
  • In case of matrix strategies, multiple comments are posted
@tibbing
Copy link

tibbing commented Jan 3, 2023

Agreed, this would also fix #40

@rjulius23
Copy link

rjulius23 commented Jan 6, 2023

Normally, if you do not specify teh pullRequestNumber parameter it should skip the comment, however I think the issue is with this part:

  const changedFiles = onlyChangedFiles
    ? await listChangedFiles(pullRequestNumber)
    : null;

  const reports = await processCoverage(path, { skipCovered });
  const comment = markdownReport(reports, commit, {
    minimumCoverage,
    showLine,
    showBranch,
    showClassNames,
    showMissing,
    showMissingMaxLength,
    linkMissingLines,
    linkMissingLinesSourceDir,
    filteredFiles: changedFiles,
    reportName,
  });

This is the section in the action.js from line 54 to 70. This runs even if the pullRequestNumber is null, and that fails the run with Not Found error. Any reason the above part is not inside the if (pullRequestNumber) block at line 76 ?

Cheers,

@reneweteling
Copy link

any news on this?

@algorys
Copy link

algorys commented Mar 8, 2024

Is there a chance to have this fix please ? 🙏 @zymotik ?

Because today a simple push to main didn't work and this plugin is great !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants