Skip to content

feat: add reusable verify-boilerplate composite action - #1070

Open
Prachi01Yadav wants to merge 12 commits into
kubeflow:masterfrom
Prachi01Yadav:feat/verify-boilerplate-action
Open

feat: add reusable verify-boilerplate composite action#1070
Prachi01Yadav wants to merge 12 commits into
kubeflow:masterfrom
Prachi01Yadav:feat/verify-boilerplate-action

Conversation

@Prachi01Yadav

@Prachi01Yadav Prachi01Yadav commented Aug 26, 2026

Copy link
Copy Markdown

Fixes #1069

What this PR does

Adds a reusable composite GitHub Action at .github/actions/verify-boilerplate/ that wraps the existing hack/boilerplate/boilerplate.py script, so Kubeflow subprojects can enforce Apache 2.0 copyright headers without vendoring the script.

Requirements checklist

  • Composite action wrapping hack/boilerplate/boilerplate.py — script is sourced directly from kubeflow/testing via actions/checkout with sparse-checkout, so callers never vendor it.
  • Input for base refbase-ref input defaults to the PR base branch (github.base_ref), so only changed/new files are flagged for year-less header enforcement.
  • Input for boilerplate template directoryboilerplate-dir input lets repos with custom templates point to their own directory. Defaults to kubeflow/testing's templates.
  • Sets up Python — includes a setup-python step (default 3.12) so callers don't need to add one.
  • Non-zero exit on failure — the script already exits non-zero with remediation output; the action inherits this behavior.

Usage

Callers can use this action in their workflows like:

steps:
  - uses: actions/checkout@v4
    with:
      fetch-depth: 0

  - uses: kubeflow/testing/.github/actions/verify-boilerplate@master
    with:
      base-ref: ${{ github.base_ref }}

Context

Signed-off-by: Prachi01Yadav <archeyyadav111@gmail.com>
@google-oss-prow

Copy link
Copy Markdown

[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 tariq-hasan for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

Comment thread .github/actions/verify-boilerplate/action.yml
Comment thread .github/actions/verify-boilerplate/action.yml Outdated
@jaiakash

Copy link
Copy Markdown
Member

@Prachi01Yadav please check the nit comments, rest looks good to me.

cc @tariq-hasan for review

Signed-off-by: Prachi01Yadav <archeyyadav111@gmail.com>

@jaiakash jaiakash left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@tariq-hasan tariq-hasan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've just had a few additional comments. Overall lgtm. Thanks.

Comment thread .github/actions/verify-boilerplate/action.yml Outdated
Comment thread .github/actions/verify-boilerplate/action.yml Outdated
Comment thread .github/actions/verify-boilerplate/action.yml Outdated
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Prachi Yadav <archeyyadav111@gmail.com>
@google-oss-prow google-oss-prow Bot removed the lgtm label Aug 28, 2026
Prachi01Yadav and others added 2 commits August 28, 2026 15:15
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Prachi Yadav <archeyyadav111@gmail.com>
Signed-off-by: Prachi01Yadav <archeyyadav111@gmail.com>
@Prachi01Yadav

Copy link
Copy Markdown
Author

I've just had a few additional comments. Overall lgtm. Thanks.

@tariq-hasan Thanks for the review! I've applied all your suggestions (removed the checkout/cleanup steps and simplified the fallback). Let me know if everything looks good now!

@tariq-hasan tariq-hasan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @Prachi01Yadav! I have added some further comments to help refine the first iteration and make it more robust.

Comment thread .github/actions/verify-boilerplate/action.yml Outdated
Comment thread .github/actions/verify-boilerplate/action.yml Outdated
Comment thread .github/actions/verify-boilerplate/action.yml Outdated
Comment thread .github/actions/verify-boilerplate/action.yml Outdated
Comment thread .github/actions/verify-boilerplate/action.yml
Comment thread .github/actions/verify-boilerplate/action.yml Outdated
Comment thread .github/actions/verify-boilerplate/action.yml Outdated
Prachi01Yadav and others added 7 commits August 31, 2026 11:26
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Prachi Yadav <archeyyadav111@gmail.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Prachi Yadav <archeyyadav111@gmail.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Prachi Yadav <archeyyadav111@gmail.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Prachi Yadav <archeyyadav111@gmail.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Prachi Yadav <archeyyadav111@gmail.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Prachi Yadav <archeyyadav111@gmail.com>
Co-authored-by: Tariq Hasan <mmtariquehsn@gmail.com>
Signed-off-by: Prachi Yadav <archeyyadav111@gmail.com>
@google-oss-prow google-oss-prow Bot added size/L and removed size/M labels Aug 31, 2026
@tariq-hasan

Copy link
Copy Markdown
Member

Thanks @Prachi01Yadav!
/lgtm
/assign @jaiakash @juliusvonkohout @andreyvelich @nsingla

@tariq-hasan

Copy link
Copy Markdown
Member

Depending on preference we can self-test this composite action directly on this testing repo (perhaps something like .github/workflows/code-quality-check.yaml) before there's adoption in consumer repos. Or we could test in kubeflow/sdk#765 directly.

@Prachi01Yadav

Copy link
Copy Markdown
Author

Depending on preference we can self-test this composite action directly on this testing repo (perhaps something like .github/workflows/code-quality-check.yaml) before there's adoption in consumer repos. Or we could test in kubeflow/sdk#765 directly.

let's just test it directly in kubeflow/sdk#765, I can update that PR to use this action as soon as this is merged.. let me know if that sounds good to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

request: Add Reusable copyright boilerplate check CI action

6 participants