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

[infra] Add PR title checker #1856

Merged
merged 7 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"LABEL": {
"name": "The PR title has to contain a package name like \"[ffigen]\", or \"[infra]\".",
Copy link
Member

Choose a reason for hiding this comment

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

This is the label name, and not the description, IIUC. Might want to opt for something shorter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe we should just leave the label away completely. There's already a red/green bot checkmark/cross.

"color": "EEEEEE"
Copy link
Member

Choose a reason for hiding this comment

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

That's quite a strong warning color

},
"CHECKS": {
"prefixes": [
"[ffi] ",
"[ffigen] ",
"[infra] ",
"[jni] ",
"[jnigen] ",
"[native_assets_builder] ",
"[native_assets_cli] ",
"[native_toolchain_c] ",
"[objective_c] ",
"[swift2objc] ",
"[swiftgen] "
]
},
"MESSAGES": {
"success": "All OK",
"failure": "Failing CI test",
"notice": ""
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe also add some ignore label to override? ;)

25 changes: 25 additions & 0 deletions .github/workflows/pr-title-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "PR Title Checker"
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
pull_request_target:
types:
- opened
- edited
- reopened
- synchronize
- labeled
- unlabeled

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: thehanimo/[email protected]
Copy link
Member

Choose a reason for hiding this comment

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

with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
Loading