Skip to content

[chore][ci] only run codeowners workflow when related files are changed#42999

Merged
songy23 merged 1 commit into
open-telemetry:mainfrom
paulojmdias:chore/ci_codeowners_condition
Sep 26, 2025
Merged

[chore][ci] only run codeowners workflow when related files are changed#42999
songy23 merged 1 commit into
open-telemetry:mainfrom
paulojmdias:chore/ci_codeowners_condition

Conversation

@paulojmdias
Copy link
Copy Markdown
Member

Description

Based on the discussion we had on the following Slack thread, we decided to propose adding the ability to skip the codeowners workflow if the related files are not changed at all. This will improve the CI performance a bit.

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
@paulojmdias paulojmdias requested a review from a team as a code owner September 25, 2025 21:15
@paulojmdias paulojmdias requested a review from mx-psi September 25, 2025 21:15
@paulojmdias
Copy link
Copy Markdown
Member Author

/label skip-changelog

@songy23 songy23 added ci-cd CI, CD, testing, build issues Skip Changelog PRs that do not require a CHANGELOG.md entry labels Sep 25, 2025
@songy23 songy23 merged commit a5fb7b8 into open-telemetry:main Sep 26, 2025
221 of 222 checks passed
@github-actions github-actions Bot added this to the next release milestone Sep 26, 2025
@paulojmdias paulojmdias deleted the chore/ci_codeowners_condition branch September 26, 2025 12:48
@paulojmdias
Copy link
Copy Markdown
Member Author

Tested in #42181 and #42802, and is working as expected.

On #42181, the test was not run, on #42802, the test was run as expected.

github-merge-queue Bot pushed a commit to open-telemetry/opentelemetry-collector that referenced this pull request Oct 7, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR ports the `check-codeowners` workflow from the
`opentelemetry-collector-contrib` repository.

On this side, the command referenced in the workflow is `make
generate-codeowners` instead of `make gencodeowners` as is in the
contrib version. In the `Makefile`, I added the `-skipgithub` to avoid
giving an error like below when the members run it.

```sh
2025/09/25 22:52:36 set the environment variable `GITHUB_TOKEN` to a PAT token to authenticate
```

I ran `gengithub`, which also produced some changes in issue templates.

Like the PR
#13898, I
also removed the `make install-tools` from this workflow.

The idea to port this workflow here came from the PR
open-telemetry/opentelemetry-collector-contrib#42999
discussion in Slack.

---------

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd CI, CD, testing, build issues Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants