Disable annotations from GitHub actions when reviewing a PR #212672
Replies: 5 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
the deprecation warnings from The root cause is that The cleanest fix is to disable matcher registration at the source: - uses: actions/setup-java@v4
with:
problem-matcher: falseIf you can't change the action input, you can remove the matcher mid-workflow: - run: echo "::remove-matcher owner=java::"One thing to keep in mind: without matchers, the log lines still appear in the raw workflow log — they just won't render as inline annotations in the diff. So you can still find the warnings if you need them, but the PR view stays clean. The only link I can safely point you to is https://github.com/actions/setup-java, where the |
|
Thank you! It solved the problem. But it shouldn't have been enabled in the first place so I have added a bug report about it, actions/setup-java#1322. And while it solves the problem for new PRs, it doesn't solve the problem for existing PRs. So I still have the problem for https://github.com/JMRI/JMRI/pull/15758/changes. |
|
These annotations come from a GitHub Actions problem matcher, which turns javac output (here, the "deprecated and marked for removal" warning) into annotations on the PR diff. To stop them, remove the matcher in the - name: Disable Java problem matchers
run: |
echo "::remove-matcher owner=java::"Example placement: steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 25
- name: Disable Java problem matchers
run: |
echo "::remove-matcher owner=java::"
- name: Build
run: ant -noinput clean testsThe warnings will still appear in the job log, but no longer as annotations on the "Files changed" tab. Other options:
GitHub has no per-user setting to hide check annotations in the PR diff, so this has to be changed in the workflow. |
|
This issue now seems to be resolved. actions/setup-java#1326 changes the default for So I'm closing this thread. Thanks to all of you that have responded! |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
Body
The annotations from GitHub actions in the source code is a real pain when reviewing a PR. It makes the Java code really difficult to read and is completely useless to me. The review process has become much much harder with these annotations. It's a pain.
This image is from https://github.com/JMRI/JMRI/pull/15758/changes,
the
file java/src/jmri/implementation/DefaultSection.java.We have a GitHub action
Static Analysis Java25which gives these warnings.But I don't want these annotations when reviewing a PR.
All reactions