stacklok / stacklok/toolhive

[SPIKE] Investigate implementation of branch protections which respect conditional build gates

Open
#3,055 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

github_actions p1
Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

Background

Right now, it is possible to merge a PR if you receive approval, but before all build steps are passed. This has led to issues where PRs have been merged with failed builds. It also prevents us from enforcing that all branches are up to date before merge (this has also led to problems due to conflicts between PRs merged around the same time).

An attempt to implement branch protections proved unsuccessful since we use conditional github actions in the repo. For example, if you enforce that unit tests pass, but you only make a documentation change, Github will sit waiting for unit tests which never get triggered since no .go file is modified. This prevented PRs from being merged.

Task

Investigate if there is some mechanism in Github to only block on a build gate if it's actually run.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing the repository’s conditional GitHub Actions and current branch protection settings, then check GitHub’s documentation for protections that handle conditionally skipped build gates. Done means documenting a viable mechanism or confirming the limitation and outlining the required approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, github-actions
Domain
ci-cd
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.