Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

feat(action): trust-check/validate-source-branch - Validate PR source branch

Open
#34 2 comments 0 reactions 1 assignee View on GitHub

@aRustyDev is already working on this.

Since Jan 27, 2026.

Assessment

This issue has not been assessed yet.

Description

enhancement new-action

Parent Epic

Part of #22 (Atomic Release Pipeline Actions)

Priority

P2 - Security validation for W5

Description

Create a composite action that validates a PR's source branch matches an expected pattern.

Used to enforce that PRs to protected branches come from expected source branches.

Inputs

Input Required Default Description
source-branch Yes - The source branch of the PR
allowed-pattern Yes - Allowed branch pattern (glob supported)

Outputs

Output Description
valid "true" if branch matches pattern
pattern-matched The pattern that matched (for multiple patterns)

Usage Example

# Single pattern
- uses: arustydev/gha/actions/trust-check/validate-source-branch@v1
  with:
    source-branch: ${{ github.head_ref }}
    allowed-pattern: "charts/*"

# Multiple patterns (comma-separated)
- uses: arustydev/gha/actions/trust-check/validate-source-branch@v1
  with:
    source-branch: ${{ github.head_ref }}
    allowed-pattern: "charts/*,hotfix/*,release/*"

Source Reference

helm-charts/.github/scripts/attestation-lib.sh:

  • validate_source_branch() (lines 296-314)

Implementation Notes

  • Support glob patterns (e.g., charts/*)
  • Support multiple patterns (comma-separated)
  • Fail with clear error message on mismatch
Dominant language
Shell
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

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.

More from aRustyDev/gh

All issues in aRustyDev/gh

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.