Skip to content

Commit

Permalink
[chore] Run a check on codeowners, backed by a github token (#32025)
Browse files Browse the repository at this point in the history
This PR introduces a check backed by a github token that tests the
content of .github/CODEOWNERS against the metadata of all the
components. Given that a token is used, and won't be present in builds
running with forks, this check is only made on the main branch of the
repository `open-telemetry/opentelemetry-collector-contrib`.

As such, I can't really test if it all works. The token is provisioned
by open-telemetry/community#1659. More context
in
#30552
  • Loading branch information
atoulme committed Apr 3, 2024
1 parent a4a50d2 commit a930320
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-and-test.yml
Expand Up @@ -224,6 +224,11 @@ jobs:
run: |
make gendistributions
git diff -s --exit-code || (echo 'Generated code is out of date, please run "make gendistributions" and commit the changes in this PR.' && exit 1)
- name: Gen CODEOWNERS
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'open-telemetry/opentelemetry-collector-contrib'
run: |
GITHUB_TOKEN=${{ secrets.READ_ORG_AND_USER_TOKEN }} make gengithub
git diff -s --exit-code || (echo 'Generated code is out of date, please apply this diff and commit the changes in this PR.' && git diff && exit 1)
- name: CodeGen
run: |
make -j2 generate
Expand Down

0 comments on commit a930320

Please sign in to comment.