Skip to content

ci: consider only pull request event when running public-symbols-check #4195

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

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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