ghcontrib
This module provides functions to check that pull requests conform toproject 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@f233063fd7b2365ac40b23ffe98fe69a8d4c3cedEntrypoint
Return Type
Ghcontrib !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| token | Secret ! | - | GitHub token. |
| repo | String ! | - | GitHub repository (e.g. "owner/repo"). |
Example
Function Ghcontrib.Constructor is not accessible from the ghcontrib moduleFunction Ghcontrib.Constructor is not accessible from the ghcontrib moduleFunction Ghcontrib.Constructor is not accessible from the ghcontrib moduleFunction Ghcontrib.Constructor is not accessible from the ghcontrib moduleTypes
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
| Name | Type | Default Value | Description |
|---|---|---|---|
| number | Integer ! | - | The pull request number to check |
Example
Function Ghcontrib.checkPullRequest is not accessible from the ghcontrib moduleFunction Ghcontrib.checkPullRequest is not accessible from the ghcontrib moduleFunction Ghcontrib.checkPullRequest is not accessible from the ghcontrib moduleFunction Ghcontrib.checkPullRequest is not accessible from the ghcontrib modulecheckPullRequestLinearMagicWord() 🔗
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
| Name | Type | Default Value | Description |
|---|---|---|---|
| number | Integer ! | - | The pull request number to check |
Example
Function Ghcontrib.checkPullRequestLinearMagicWord is not accessible from the ghcontrib moduleFunction Ghcontrib.checkPullRequestLinearMagicWord is not accessible from the ghcontrib moduleFunction Ghcontrib.checkPullRequestLinearMagicWord is not accessible from the ghcontrib moduleFunction Ghcontrib.checkPullRequestLinearMagicWord is not accessible from the ghcontrib module