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

chore: add PR title check workflow #13872

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HuiSF
Copy link
Member

@HuiSF HuiSF commented Oct 1, 2024

Description of changes

Check PR title following the conventional commit format: https://www.conventionalcommits.org

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

Checklist for repo maintainers

  • Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows
  • New source file paths included in this PR have been added to CODEOWNERS, if appropriate

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HuiSF HuiSF requested review from a team as code owners October 1, 2024 18:21
@HuiSF HuiSF force-pushed the hui/chore/conventional-commit-gha branch 3 times, most recently from 8efc2a5 to 9bcfaa5 Compare October 1, 2024 18:50
@HuiSF HuiSF force-pushed the hui/chore/conventional-commit-gha branch from 9bcfaa5 to f014b03 Compare October 1, 2024 21:42
scopes=$(ls -d ./packages/*/ 2>/dev/null | xargs -n 1 basename | tr '\n' '|' | sed 's/|$//')

# Generate the regular expression
regex="^(feat|fix|docs|style|refactor|perf|test|chore|revert|release)(\(($scopes|required)\))?: .+$"
Copy link
Member

@ashika112 ashika112 Oct 1, 2024

Choose a reason for hiding this comment

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

our default commits post release is chore (release) we should update regex to enable that as well.

Also, we have in our runbook hot-fix/ which does not really conform to this. Maybe we should update the runbook or allow for it for now. Its for branch nvm

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the merging release back to main PR has hardedcoded name as chore: Merge release into main:

gh pr create -B main -H $TEMP_BRANCH_NAME --title 'chore: Merge release into main' --body 'Merge the recently completed release back into the main development branch. Generated by the callable-npm-publish-release workflow.'

@AllanZhengYP
Copy link
Member

Have you looked into the commitlint cli which can be used to validate if a string is in conventional commit format? The conventional commit can be configured with commitlint.config.js

AllanZhengYP
AllanZhengYP previously approved these changes Oct 2, 2024
ashwinkumar6
ashwinkumar6 previously approved these changes Oct 2, 2024
Copy link
Member

@ashwinkumar6 ashwinkumar6 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this !

jjarvisp
jjarvisp previously approved these changes Oct 3, 2024
ashika112
ashika112 previously approved these changes Oct 3, 2024
@HuiSF HuiSF marked this pull request as draft October 17, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants