Skip to content

Commit

Permalink
ci: consider only pull request event when running public-symbols-check (
Browse files Browse the repository at this point in the history
#4195)

* CONTRIBUTING: the label is called "Approve Public API check"

* ci: consider only pull request event when running public-symbols-check
  • Loading branch information
xrmx authored Sep 19, 2024
1 parent 71db261 commit 6baea36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/misc_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
runs-on: ubuntu-latest
if: |
!contains(github.event.pull_request.labels.*.name, 'Approve Public API check')
&& github.actor != 'opentelemetrybot'
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Every public symbol is something that has to be kept in order to maintain backwa

To check if your PR is adding public symbols, run `tox -e public-symbols-check`. This will always fail if public symbols are being added/removed. The idea
behind this is that every PR that adds/removes public symbols fails in CI, forcing reviewers to check the symbols to make sure they are strictly necessary.
If after checking them, it is considered that they are indeed necessary, the PR will be labeled with `Skip Public API check` so that this check is not
If after checking them, it is considered that they are indeed necessary, the PR will be labeled with `Approve Public API check` so that this check is not
run.

Also, we try to keep our console output as clean as possible. Most of the time this means catching expected log messages in the test cases:
Expand Down
4 changes: 2 additions & 2 deletions scripts/public_symbols_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def remove_common_symbols():
print(
"Please make sure that all of them are strictly necessary, if not, "
"please consider prefixing them with an underscore to make them "
'private. After that, please label this PR with "Skip Public API '
'private. After that, please label this PR with "Approve Public API '
'check".'
)
print()
Expand All @@ -154,7 +154,7 @@ def remove_common_symbols():
print(
"Please make sure no public symbols are removed, if so, please "
"consider deprecating them instead. After that, please label this "
'PR with "Skip Public API check".'
'PR with "Approve Public API check".'
)
exit(1)
else:
Expand Down

0 comments on commit 6baea36

Please sign in to comment.