Implementation:Cypress io Cypress GetInstallMessage
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Release_Engineering, Communication |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Concrete tool for posting release installation instructions as GitHub commit comments provided by the add-install-comment script.
Description
The getInstallMessage function (scripts/add-install-comment.js:L53-65) constructs a formatted installation message string. The script then posts this message as a GitHub commit comment using @octokit/core with GitHub App authentication (L67-84).
Usage
Called as the final CI pipeline step after successful release publishing.
Code Reference
Source Location
- Repository: cypress-io/cypress
- File: scripts/add-install-comment.js
- Lines: L53-65 (getInstallMessage), L67-84 (GitHub API comment)
Signature
function getInstallMessage() {
// Returns formatted string with:
// - Version number
// - Install command (npm install cypress@<version>)
// - CI environment name
return `Install ...`
}
// GitHub API posting
const octokit = new Octokit({
authStrategy: createAppAuth,
auth: { appId: GITHUB_APP_ID, privateKey: GITHUB_PRIVATE_KEY }
})
await octokit.request('POST /repos/cypress-io/cypress/commits/{sha}/comments', {
sha: commitSha,
body: getInstallMessage(),
})
Import
// CLI invocation
node scripts/add-install-comment.js
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| GITHUB_APP_ID | env var | Yes | GitHub App ID for authentication |
| GITHUB_PRIVATE_KEY | env var | Yes | GitHub App private key |
| Commit SHA | string | Yes | Release commit SHA for comment target |
Outputs
| Name | Type | Description |
|---|---|---|
| GitHub comment | API response | Commit comment with install instructions |
Usage Examples
CI Pipeline Step
# Post install comment after release
node scripts/add-install-comment.js --sha $CIRCLE_SHA1
Related Pages
Implements Principle
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment