kubebuilder-release-tools icon indicating copy to clipboard operation
kubebuilder-release-tools copied to clipboard

Create a Custom action to provide the shell script to validate the PR titles

Open camilamacedo86 opened this issue 1 year ago • 1 comments
trafficstars

Context:

Refer to this PR. Discussion thread: Slack thread.

Description: We need to create a custom GitHub action that provides a shell script to validate PR titles. This would ensure consistency in PR naming conventions and improve the overall workflow.

Idea

We might need add here:

name: "PR Title Validator"
description: "Validates PR titles based on predefined conventions."
inputs:
  github-token:
    description: "GitHub Token"
    required: true
runs:
  using: "bash"
  main: "entrypoint.sh" <-- And add the shell script


therefore, people could use it like

jobs:
  pr-title-check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Run PR Title Validator from kubebuilder-release-tools
        uses: kubernetes-sigs/kubebuilder-release-tools/.github/actions/pr-title-checker@main
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

Then we need to

  • Do the changes to provide the action
  • Update the docs here: https://github.com/kubernetes-sigs/kubebuilder-release-tools?tab=readme-ov-file#pr-verification-github-action-deprecated accordingly.

camilamacedo86 avatar Sep 17 '24 08:09 camilamacedo86