Skip to content

fix: action failure on branch with perennial parent#10

Merged
tranhl merged 1 commit intomainfrom
fix/config-parsing
Mar 28, 2024
Merged

fix: action failure on branch with perennial parent#10
tranhl merged 1 commit intomainfrom
fix/config-parsing

Conversation

@tranhl
Copy link
Collaborator

@tranhl tranhl commented Mar 28, 2024

Description

Fixes #8.

Error was caused by two issues:

  1. octokit.rest.repos.listBranches can only list either unprotected branches or protected branches at the same time. Most of the time, perennial branches are also protected branches. This meant that perennial branches weren't being included in the action's inputs because they simply weren't returned in the API response. Calling octokit.rest.repos.listBranches again with protected: true solves this issue.
  2. The TOML parser was incorrectly assumed to automatically camelcase property names. This meant that perennial-regex from .git-branches.toml was never properly read. Fixed by correcting the relevant zod schema.

Stack

@tranhl tranhl force-pushed the fix/config-parsing branch from bf7d262 to b67283a Compare March 28, 2024 09:54
@tranhl tranhl merged commit 1860fa2 into main Mar 28, 2024
@tranhl tranhl deleted the fix/config-parsing branch March 28, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Action fails on branches that have a perennial branch as a parent

1 participant