Skip to content

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vikas-saxena02
Copy link
Contributor

@vikas-saxena02 vikas-saxena02 commented Mar 18, 2025

Checklist:

  • [*] You have signed off your commits
  • [*] Ensure you follow best practices from our guide. Contributing.
  • [*] You have included screenshots when changing the website style or adding a new page.

Description of your changes:

Issue

Labels

/area website

@google-oss-prow google-oss-prow bot added the area/website AREA: Website Styles/Hosting/Serving label Mar 18, 2025
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign johnugeorge for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vikas-saxena02 vikas-saxena02 changed the title added logic to the pr_title_check.yaml website: added logic to the pr_title_check.yaml Mar 18, 2025
@vikas-saxena02
Copy link
Contributor Author

Proof that the change works
Screenshot 2025-03-18 at 10 43 11 pm

@vikas-saxena02
Copy link
Contributor Author

@varodrig can you please review this as well

@vikas-saxena02 vikas-saxena02 changed the title website: added logic to the pr_title_check.yaml website: added logic to the pr_title_check.yaml to put error message as a comment Mar 18, 2025
@juliusvonkohout
Copy link
Member

can they use /retitle or so as well?

@vikas-saxena02
Copy link
Contributor Author

vikas-saxena02 commented Mar 22, 2025

@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 .github/workflows/ that could have disabled retitle.
I am happy to add configuration that could enable the /retitle command let me know if that is what you want.

@milinddethe15
Copy link
Contributor

I am happy to add configuration that could enable the /retitle command let me know if that is what you want.

/ retitle is command by Google OSS Prow bot. see https://oss.gprow.dev/command-help?repo=kubeflow%2Fwebsite#retitle

@vikas-saxena02
Copy link
Contributor Author

vikas-saxena02 commented Apr 6, 2025

I am happy to add configuration that could enable the /retitle command let me know if that is what you want.

/ retitle is command by Google OSS Prow bot. see https://oss.gprow.dev/command-help?repo=kubeflow%2Fwebsite#retitle

I know but it seems not to be working here.
I explicitly mentioned that in my comment that although there is nothing in config that could have disabled it

@milinddethe15
Copy link
Contributor

/retitle test

Copy link

@milinddethe15: Re-titling can only be requested by trusted users, like repository collaborators.

In response to this:

/retitle test

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.

@milinddethe15
Copy link
Contributor

milinddethe15 commented Apr 6, 2025

You can't use these commands in your fork. IG, you need to then install the bot there.

@vikas-saxena02
Copy link
Contributor Author

/retitle website: testing retitle

@google-oss-prow google-oss-prow bot changed the title website: added logic to the pr_title_check.yaml to put error message as a comment website: testing retitle Apr 6, 2025
@vikas-saxena02
Copy link
Contributor Author

/retitle website: added logic to the pr_title_check.yaml to put error message as a comment

@google-oss-prow google-oss-prow bot changed the title website: testing retitle website: added logic to the pr_title_check.yaml to put error message as a comment Apr 6, 2025
@vikas-saxena02
Copy link
Contributor Author

@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>
@vikas-saxena02 vikas-saxena02 force-pushed the making_error_message_comment branch from 4f84325 to 5b8ae79 Compare April 9, 2025 10:08
@vikas-saxena02
Copy link
Contributor Author

@juliusvonkohout @milinddethe15 i have updated the error message as indicated below and also done a rebase to master

Screenshot 2025-04-09 at 8 08 03 pm

Signed-off-by: Vikas Saxena <Vikas.Saxena.2006@gmail.com>
@vikas-saxena02
Copy link
Contributor Author

@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."
Copy link
Contributor

Choose a reason for hiding this comment

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

Some suggestions else LGTM

Suggested change
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\`."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/website AREA: Website Styles/Hosting/Serving size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

website: Fix issue in pr template chore(website): Put error message for PR title check as a comment
3 participants