Skip to content
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

feat: add a script to check for PR title and labelling #17649

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grunweg
Copy link
Collaborator

@grunweg grunweg commented Oct 11, 2024

The script checks most items from the commit convention, ensures that a feature PR has a topic/area label,
and errors if any two labels are contradictory.

Extracted from #16303. That PR will make this workflow run in CI.


Open in Gitpod

@grunweg grunweg added CI Modifies the continuous integration / deployment setup t-linter Linter labels Oct 11, 2024
Copy link

github-actions bot commented Oct 11, 2024

PR summary 4a05ec2e85

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ checkTitleLabels
+ checkTitleLabelsCLI
+ hasContradictoryLabels
+ main
+ splitAtPos
+ validateTitle

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.

The script checks most items from the commit convention,
ensures that a feature PR has a topic/area label,
and errors if any two labels are contradictory.

Add detailed tests for the title validation.
@grunweg
Copy link
Collaborator Author

grunweg commented Oct 11, 2024

Since the other PR has CI issues, let me extract the validation logic to a separate PR, which can hopefully land earlier.
@bryangingechen @joneugster Would one of you like to re-review? There are lots of tests now, which might speed that up.

@bryangingechen
Copy link
Contributor

Just checking: Lean files in scripts aren't checked by CI, right?

@grunweg
Copy link
Collaborator Author

grunweg commented Oct 11, 2024

It depends: syntax linters run on every file importing them, but otherwise CI shouldn't touch them.
This script is not used or touched by CI until a workflow uses it (as in, e.g., the next PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Modifies the continuous integration / deployment setup t-linter Linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants