-
Notifications
You must be signed in to change notification settings - Fork 817
website: added logic to the pr_title_check.yaml to put error message as a comment #4051
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
base: master
Are you sure you want to change the base?
website: added logic to the pr_title_check.yaml to put error message as a comment #4051
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@varodrig can you please review this as well |
can they use /retitle or so as well? |
@juliusvonkohout I tried testing retitle in my own fork and it seems to do nothing. Although there is no error message from the bot. I didnt fing anything specific in |
|
I know but it seems not to be working here. |
/retitle test |
@milinddethe15: Re-titling can only be requested by trusted users, like repository collaborators. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
You can't use these commands in your fork. IG, you need to then install the bot there. |
/retitle website: testing retitle |
/retitle website: added logic to the pr_title_check.yaml to put error message as a comment |
@milinddethe15 thanks for pointing it out. @juliusvonkohout I just tested retitle and it works well. |
Signed-off-by: Vikas Saxena <Vikas.Saxena.2006@gmail.com>
Signed-off-by: Vikas Saxena <Vikas.Saxena.2006@gmail.com>
Signed-off-by: Vikas Saxena <Vikas.Saxena.2006@gmail.com>
4f84325
to
5b8ae79
Compare
@juliusvonkohout @milinddethe15 i have updated the error message as indicated below and also done a rebase to master ![]() |
Signed-off-by: Vikas Saxena <Vikas.Saxena.2006@gmail.com>
@varodrig can i please get your review as well |
run: | | ||
VALID_COMPONENTS="central-dashboard|katib|kserve|model-registry|notebooks|pipelines|spark-operator|trainer|gsoc|website|community" | ||
if [[ ! "$PR_TITLE" =~ ^($VALID_COMPONENTS):\ .+ ]]; then | ||
echo "❌ PR title does not follow the correct format: 'component_name: description'" | ||
echo "Component value must be one of these central-dashboard|katib|kserve|model-registry|notebooks|pipelines|spark-operator|trainer|gsoc|website|community" | ||
echo "Example: model-registry: Add model registry UI Installation instructions" | ||
|
||
COMMENT_BODY="⚠️ **Invalid PR Title** ⚠️\n\nYour PR title \`$PR_TITLE\` does not match the required format: \`component_name: description\`.\n\n**Allowed components (case sensitive):** \`central-dashboard, katib, kserve, model-registry, notebooks, pipelines, spark-operator, trainer, gsoc, website, community\`\n\n✅ **Example:** \`model-registry: Add model registry UI Installation instructions\`\n\nPlease update your PR title accordingly by either using GITHUB GUI or by usinge \`/retitle component_name: description\` as stated above." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions else LGTM
COMMENT_BODY="⚠️ **Invalid PR Title** ⚠️\n\nYour PR title \`$PR_TITLE\` does not match the required format: \`component_name: description\`.\n\n**Allowed components (case sensitive):** \`central-dashboard, katib, kserve, model-registry, notebooks, pipelines, spark-operator, trainer, gsoc, website, community\`\n\n✅ **Example:** \`model-registry: Add model registry UI Installation instructions\`\n\nPlease update your PR title accordingly by either using GITHUB GUI or by usinge \`/retitle component_name: description\` as stated above." | |
COMMENT_BODY="⚠️ **Invalid PR Title** ⚠️\n\nYour PR title \`$PR_TITLE\` does not match the required format: \`component_name: description\`.\n\n**Allowed components (case sensitive):** \`central-dashboard, katib, kserve, model-registry, notebooks, pipelines, spark-operator, trainer, gsoc, website, community\`\n\n✅ **Example:** \`model-registry: Add model registry UI Installation instructions\`\n\nPlease update your PR title accordingly by either using GITHUB UI or by using comment command \`/retitle component_name: description\`." |
Checklist:
Description of your changes:
Issue
Labels
/area website