Skip to content

Add kind:tests label for PRs that only modify test files - #61382

Closed
henry3260 wants to merge 1 commit into
apache:mainfrom
henry3260:autolabel-tests-prs
Closed

henry3260 wants to merge 1 commit into
apache:mainfrom
henry3260:autolabel-tests-prs

Conversation

@henry3260

Copy link
Copy Markdown
Contributor

closes: #61377


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@henry3260 henry3260 changed the title Add 'kind:tests' label for PRs that only modify test files Add kind:tests label for PRs that only modify test files Feb 3, 2026
@henry3260

Copy link
Copy Markdown
Contributor Author

I hope I didn't miss anything.

Comment thread .github/boring-cyborg.yml Outdated
- helm-tests/**/*
- kubernetes-tests/**/*
- task-sdk-integration-tests/**/*
- providers/**/tests/**/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work.
It will add the test label to any PR that modifies test files. This means that the label will be added to all PRs.

The task is to add the labels to PRs that changes only test files.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work. It will add the test label to any PR that modifies test files. This means that the label will be added to all PRs.

The task is to add the labels to PRs that changes only test files.

Thanks for the clarification. I misunderstood the requirement.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. This is a bit more complex :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. This is a bit more complex :)

Should we automatically remove the label if the contributor adds non-test files?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we shouldn't add labels in such cases.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I do not know if boring cyborg has a technical limitation on that

# specific language governing permissions and limitations
# under the License.
---
name: Label tests-only PRs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a boring cyborg to do it, can't we do it there: https://github.com/apache/airflow/blob/main/.github/boring-cyborg.yml?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a boring cyborg to do it, can't we do it there: https://github.com/apache/airflow/blob/main/.github/boring-cyborg.yml?

Thanks for reviewing! I think we need additional logic to verify that every changed file is a test file, which is why a GitHub Actions workflow is needed.

@potiuk

potiuk commented Feb 15, 2026

Copy link
Copy Markdown
Member

This will not work. pull request workflow from fork cannot have write permissions.

@potiuk potiuk closed this Feb 15, 2026
@potiuk

potiuk commented Feb 15, 2026

Copy link
Copy Markdown
Member

this can really be done only via app - you can add feature to boring cyborg for that if missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autolabel "tests" PRs with a new github label

4 participants