Dagger
Search

ghcontrib

This module provides functions to check that pull requests conform to
project standards. It uses the GitHub CLI (gh) to inspect PR metadata
and validates titles, Linear references, labels, and other properties.

Installation

dagger install github.com/papercomputeco/daggerverse/ghcontrib@f233063fd7b2365ac40b23ffe98fe69a8d4c3ced

Entrypoint

Return Type
Ghcontrib !
Arguments
NameTypeDefault ValueDescription
tokenSecret !-GitHub token.
repoString !-GitHub repository (e.g. "owner/repo").
Example
Function Ghcontrib.Constructor is not accessible from the ghcontrib module
Function Ghcontrib.Constructor is not accessible from the ghcontrib module
Function Ghcontrib.Constructor is not accessible from the ghcontrib module
Function Ghcontrib.Constructor is not accessible from the ghcontrib module

Types

Ghcontrib 🔗

checkPullRequest() 🔗

CheckPullRequest validates that a pull request conforms to project standards. It checks that the PR title starts with one of the required prefixes.

This is intended to be called from a GitHub Actions workflow where the GitHub token and PR metadata are available.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
numberInteger !-

The pull request number to check

Example
Function Ghcontrib.checkPullRequest is not accessible from the ghcontrib module
Function Ghcontrib.checkPullRequest is not accessible from the ghcontrib module
Function Ghcontrib.checkPullRequest is not accessible from the ghcontrib module
Function Ghcontrib.checkPullRequest is not accessible from the ghcontrib module

checkPullRequestLinearMagicWord() 🔗

CheckPullRequestLinearMagicWord validates that a pull request title or body references a Linear issue using a GitHub magic word, e.g. “fixes PCC-123”.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
numberInteger !-

The pull request number to check

Example
Function Ghcontrib.checkPullRequestLinearMagicWord is not accessible from the ghcontrib module
Function Ghcontrib.checkPullRequestLinearMagicWord is not accessible from the ghcontrib module
Function Ghcontrib.checkPullRequestLinearMagicWord is not accessible from the ghcontrib module
Function Ghcontrib.checkPullRequestLinearMagicWord is not accessible from the ghcontrib module