Skip to content

Commit 6baea36

Browse files
authored
ci: consider only pull request event when running public-symbols-check (open-telemetry#4195)
* CONTRIBUTING: the label is called "Approve Public API check" * ci: consider only pull request event when running public-symbols-check
1 parent 71db261 commit 6baea36

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/misc_0.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
runs-on: ubuntu-latest
148148
if: |
149149
!contains(github.event.pull_request.labels.*.name, 'Approve Public API check')
150-
&& github.actor != 'opentelemetrybot'
150+
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
151151
steps:
152152
- name: Checkout repo @ SHA - ${{ github.sha }}
153153
uses: actions/checkout@v4

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Every public symbol is something that has to be kept in order to maintain backwa
8282

8383
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
8484
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.
85-
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
85+
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
8686
run.
8787

8888
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:

scripts/public_symbols_checker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def remove_common_symbols():
139139
print(
140140
"Please make sure that all of them are strictly necessary, if not, "
141141
"please consider prefixing them with an underscore to make them "
142-
'private. After that, please label this PR with "Skip Public API '
142+
'private. After that, please label this PR with "Approve Public API '
143143
'check".'
144144
)
145145
print()
@@ -154,7 +154,7 @@ def remove_common_symbols():
154154
print(
155155
"Please make sure no public symbols are removed, if so, please "
156156
"consider deprecating them instead. After that, please label this "
157-
'PR with "Skip Public API check".'
157+
'PR with "Approve Public API check".'
158158
)
159159
exit(1)
160160
else:

0 commit comments

Comments
 (0)