[dry-run] Would post PR comment to #42:## 🚀 Release Published| Field | Value || ------- | -------------- || Version | 1.0.0 → 1.1.0 || Tags | v1.1.0 |...
In GitLab CI, CI_MERGE_REQUEST_IID is automatically available in merge request pipelines. Use CI_JOB_TOKEN for authentication — it has permission to comment on merge requests.
pr-comment
Post release information as a comment on your pull request or merge request.
Usage
What It Does
The
pr-commentcommand posts release information as a comment on your PR/MR:--pr-number)Options
--pr-number
Override the auto-detected PR/MR number:
Useful in CI/CD where the PR number is available as an environment variable.
--dry-run
Preview the comment without posting:
This will:
--config
Use a different configuration file:
This will load
relizy.production.config.tsinstead ofrelizy.config.ts.--log-level
Control logging verbosity:
Available levels:
silent- No outputerror- Errors onlywarn- Warnings and errorslog- Standard logsinfo- Informational messages (default)debug- Detailed debugging informationverbose- Maximum verbosityExamples
Basic Usage
Post a comment on the PR associated with the current branch:
Dry Run
Preview the comment without posting:
Output:
Override PR Number
Specify the PR/MR number manually:
CI/CD Usage
In GitHub Actions:
In GitLab CI:
Configuration
Configure PR comment behavior in
relizy.config.ts:append- Creates a new comment each timeupdate- Updates the existing Relizy comment (uses a hidden marker to find it)Environment Variables
GitHub
Set any of these environment variables for GitHub authentication:
Token priority:
RELIZY_GITHUB_TOKEN>GITHUB_TOKEN>GH_TOKENGitLab
Set any of these environment variables for GitLab authentication:
Token priority:
RELIZY_GITLAB_TOKEN>GITLAB_TOKEN>GITLAB_API_TOKEN>CI_JOB_TOKENCI/CD Integration
GitHub Actions
WARNING
The
pull-requests: writepermission is required for posting PR comments withGITHUB_TOKEN.GitLab CI
TIP
In GitLab CI,
CI_MERGE_REQUEST_IIDis automatically available in merge request pipelines. UseCI_JOB_TOKENfor authentication — it has permission to comment on merge requests.Integration with release Command
The
pr-commentcommand is automatically run as part of thereleaseworkflow when enabled:Then:
This will run the complete workflow including posting a PR comment.
To skip PR commenting during release:
See Also