Skip to content

github: Add hl-ci- as a branch name prefix#3581

Merged
joaquimrocha merged 1 commit intokubernetes-sigs:mainfrom
headlamp-k8s:add-hl-ci-branch-prefixes-to-workflows
Jul 7, 2025
Merged

github: Add hl-ci- as a branch name prefix#3581
joaquimrocha merged 1 commit intokubernetes-sigs:mainfrom
headlamp-k8s:add-hl-ci-branch-prefixes-to-workflows

Conversation

@joaquimrocha
Copy link
Contributor

Summary

This PR updates the branches used in CI workflows so they have the hl-ci- prefix, which doesn't get protected by the kubernetes branch policies, thus allowing us to delete/update them easily.

Notes for the Reviewer

No test needed since this will be related to the release. Just double check if the logic makes sense and there are no typos or things like that.

So we do not get branch protection on these CI related branches.

Signed-off-by: Joaquim Rocha <joaquim.rocha@microsoft.com>
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2025
@k8s-ci-robot k8s-ci-robot requested review from sniok and vyncent-t July 7, 2025 11:06
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 7, 2025
@joaquimrocha joaquimrocha requested review from Copilot and removed request for sniok and vyncent-t July 7, 2025 11:06
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 7, 2025
@joaquimrocha joaquimrocha requested a review from sniok July 7, 2025 11:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR prefixes CI workflow branch names with hl-ci- to bypass Kubernetes branch protection and simplify cleanup.

  • Updated branch creation, push, and PR commands to use hl-ci- prefixes in multiple workflows
  • Introduced BRANCH_NAME variables for consistency in minikube and homebrew scripts
  • Adjusted echo URLs to reference new branch names

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/pr-to-update-winget.yml Prefixed branch names and PR URL with hl-ci-
.github/workflows/pr-to-update-minikube.yml Added BRANCH_NAME var and updated all branch operations
.github/workflows/pr-to-update-homebrew.yml Added BRANCH_NAME var and updated all branch operations
.github/workflows/pr-to-update-choco.yml Prefixed branch names and PR URL with hl-ci-
.github/workflows/pr-to-update-chart.yml Prefixed BRANCH assignment with hl-ci-
Comments suppressed due to low confidence (3)

.github/workflows/pr-to-update-chart.yml:53

  • Quote $BRANCH in the grep command (grep -q "$BRANCH") to avoid potential word-splitting or unexpected pattern matching.
          if git branch -l | grep -q $BRANCH; then

.github/workflows/pr-to-update-chart.yml:52

  • To prevent push failures when a remote branch already exists, add logic to delete origin/$BRANCH (e.g., git push origin --delete "$BRANCH") before creating the new branch.
          BRANCH=hl-ci-update_chart_headlamp_$LATEST_HEADLAMP_TAG

.github/workflows/pr-to-update-choco.yml:103

  • The double echo causes the literal echo "..." to be printed. Remove the extra echo so the URL is output directly (e.g., echo "https://...").
          echo echo "https://github.com/kubernetes-sigs/headlamp/pull/new/hl-ci-choco-update-$LATEST_HEADLAMP_TAG"

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joaquimrocha, skoeva

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

The pull request process is described 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

@joaquimrocha joaquimrocha merged commit f2fe3ff into kubernetes-sigs:main Jul 7, 2025
11 of 12 checks passed
@joaquimrocha joaquimrocha deleted the add-hl-ci-branch-prefixes-to-workflows branch July 7, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants