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

Limit usage of GitHub Actions Annotations #18329

Merged
merged 1 commit into from
Sep 15, 2024
Merged

Conversation

carlocab
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

  • only use annotations for opoo and onoe if
    HOMEBREW_GITHUB_ACTIONS is set. This will make using brew less
    noisy in GitHub Actions for third parties. See
    Please use github action annotations only for high priority warnings discussions#5602.
  • if we've already called puts_annotation_if_env_set, then we no
    longer need to print the message to $stderr. The message from the
    annotation already show up in the GitHub Actions log, so printing to
    $stderr just leads to duplicate messages in the log.

While we're here, let's make sure to forward the file: and line:
kwargs of puts_annotation_if_env_set to the Annotation constructor.

- only use annotations for `opoo` and `onoe` if
  `HOMEBREW_GITHUB_ACTIONS` is set. This will make using `brew` less
  noisy in GitHub Actions for third parties. See
  Homebrew/discussions#5602.
- if we've already called `puts_annotation_if_env_set`, then we no
  longer need to print the message to `$stderr`. The message from the
  annotation already show up in the GitHub Actions log, so printing to
  `$stderr` just leads to duplicate messages in the log.

While we're here, let's make sure to forward the `file:` and `line:`
kwargs of `puts_annotation_if_env_set` to the `Annotation` constructor.
@carlocab carlocab merged commit 6c3c513 into master Sep 15, 2024
27 checks passed
@carlocab carlocab deleted the limit-annotations branch September 15, 2024 10:41
@MikeMcQuaid
Copy link
Member

As noted in #18340 (comment): would rather we instead fixed the warnings here (like #18330) rather than making them only apply to our CI.

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

Successfully merging this pull request may close these issues.

4 participants