Skip to content

Conversation

@joaquimrocha
Copy link
Contributor

Summary

This PR:

  1. creates the hl-rc- branch when calling releaser start (it's convenient)
  2. adds a way to trigger app builds using the releaser script, and also to list them.

Related Issue

fixes #3991

Steps to Test

  1. Use: releaser start 1.2.3 and verify it creates a branch locally for it
  2. Use releaser ci app --build main to verify it triggers apps for main, test the different options
  3. Use releaser ci --list to list the latest builds

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 30, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joaquimrocha

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

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

@k8s-ci-robot k8s-ci-robot requested a review from ashu8912 October 30, 2025 17:37
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 30, 2025
@k8s-ci-robot k8s-ci-robot requested a review from illume October 30, 2025 17:37
@joaquimrocha joaquimrocha added this to the v0.38.0 milestone Oct 30, 2025
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 30, 2025
@illume illume requested a review from Copilot November 3, 2025 11:44
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 adds CI build workflow management capabilities to the releaser tool, including the ability to trigger app build workflows for specific platforms and list/monitor recent workflow runs. Additionally, it enhances the release start process with optional branch creation.

  • Added new ci app command with --build and --list subcommands for managing GitHub Actions workflows
  • Added --no-branch option to the start command to optionally skip branch creation
  • Implemented utility functions for triggering and retrieving GitHub Actions workflow runs

Reviewed Changes

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

Show a summary per file
File Description
tools/releaser/src/utils/github.ts Adds triggerBuildWorkflows and getLatestAppRuns functions to interact with GitHub Actions API
tools/releaser/src/utils/git.ts Adds git utility functions for branch operations: branchExists, createAndCheckoutBranch, and getCurrentBranch
tools/releaser/src/index.ts Registers new ci app command with build and list options, and adds --no-branch option to start command
tools/releaser/src/commands/start.ts Implements optional branch creation logic with --no-branch flag support
tools/releaser/src/commands/get-app-runs.ts New command to fetch and display app workflow runs with multiple output formats
tools/releaser/src/commands/build.ts New command to trigger app build workflows with platform selection and confirmation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


export function createAndCheckoutBranch(branchName: string): void {
try {
execSync(`git checkout -b ${branchName}`);
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

The branchName parameter is used directly in a shell command without sanitization, creating a potential command injection vulnerability. Use execSync with an array of arguments or sanitize the branch name to prevent command injection.

Suggested change
execSync(`git checkout -b ${branchName}`);
execSync('git', ['checkout', '-b', branchName]);

Copilot uses AI. Check for mistakes.

export function branchExists(branchName: string): boolean {
try {
execSync(`git rev-parse --verify ${branchName}`, { stdio: 'ignore' });
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

The branchName parameter is used directly in a shell command without sanitization, creating a potential command injection vulnerability. Use execSync with an array of arguments or sanitize the branch name to prevent command injection.

Suggested change
execSync(`git rev-parse --verify ${branchName}`, { stdio: 'ignore' });
execSync('git', ['rev-parse', '--verify', branchName], { stdio: 'ignore' });

Copilot uses AI. Check for mistakes.
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

Add a subcommand to the headlamp releaser script that triggers the app builds

2 participants