heyteam-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,213 @@
1
+ # HeyTeam Project Instructions
2
+
3
+ This file contains all project configuration and instructions for AI agents (GitHub Copilot / Antigravity) to manage deployments using GitHub MCP server and Slack webhooks.
4
+
5
+ ---
6
+
7
+ ## 📋 Repository Configuration
8
+
9
+ ### Repositories
10
+
11
+ | Repository | Owner | Name | Type |
12
+ |------------|-------|------|------|
13
+ | **UI (Frontend)** | `digicert` | `dtm` | User Interface |
14
+ | **Backend** | `digicert` | `dtm-backend` | Backend API |
15
+
16
+ ---
17
+
18
+ ## 👥 Team Configuration
19
+
20
+ > [!NOTE]
21
+ > When creating PRs, the PR creator is automatically excluded from assignees and reviewers.
22
+
23
+ ### UI Team (Frontend Repository: digicert/dtm)
24
+ | Role | Members |
25
+ |------|---------|
26
+ | **Assignees** | `@priti-kumari-dc`, `@surbhi-gupta-dc`, `@shiva-burade-dc` |
27
+ | **Reviewers** | `@priti-kumari-dc`, `@surbhi-gupta-dc`, `@shiva-burade-dc` |
28
+
29
+ ### Backend Team (Backend Repository: digicert/dtm-backend)
30
+ | Role | Members |
31
+ |------|---------|
32
+ | **Assignees** | `@jaydeep-raval-dc`, `@swaraj-dhumale-dc`, `@sharmajetesh`, `@shiva-burade-dc` |
33
+ | **Reviewers** | `@jaydeep-raval-dc`, `@swaraj-dhumale-dc`, `@sharmajetesh`, `@shiva-burade-dc` |
34
+
35
+ ---
36
+
37
+ ## 🏷️ Labels Configuration
38
+
39
+ ### Backend Repository (dtm-backend)
40
+ | Environment | Label |
41
+ |-------------|-------|
42
+ | Code (no deployment) | *No label* |
43
+ | Development | `dev-deploy` |
44
+ | Integration | `integration-deploy` |
45
+ | Production | `prod-deploy` |
46
+
47
+ ### UI Repository (dtm)
48
+ | Environment | Label |
49
+ |-------------|-------|
50
+ | Code (no deployment) | *No label* |
51
+ | Development | `dev-deploy-user-interface` |
52
+ | Integration | `integration-deploy-user-interface` |
53
+ | Production | `integration-deploy-user-interface` |
54
+
55
+ ---
56
+
57
+ ## 🌿 Branch Strategy
58
+
59
+ ### Default Branch
60
+ - Default target branch: `develop`
61
+
62
+ ### Deployment Branches (Backend: dtm-backend)
63
+
64
+ | Current Branch Pattern | Target Branch | Label |
65
+ |------------------------|---------------|-------|
66
+ | `deployment/dev/**` | `deployment/dev/**-trigger` | `dev-deploy` |
67
+ | `deployment/int/**` | `deployment/int/**-trigger` | `integration-deploy` |
68
+
69
+ **Example:**
70
+ - Branch `deployment/dev/feature-123` → PR to `deployment/dev/feature-123-trigger`
71
+ - Branch `deployment/int/release-v1` → PR to `deployment/int/release-v1-trigger`
72
+
73
+ ### Deployment Branches (UI: dtm)
74
+
75
+ | Current Branch Pattern | Target Branch | Label |
76
+ |------------------------|---------------|-------|
77
+ | `deployment/dev/**` | `deployment/dev/**-trigger` | `dev-deploy-user-interface` |
78
+ | `deployment/int/**` | `deployment/int/**-trigger` | `integration-deploy-user-interface` |
79
+
80
+ ### Release Branches
81
+ When asked to create PR against "latest release branch":
82
+ 1. Search for branches matching pattern `release/*`
83
+ 2. Use the most recently created branch
84
+ 3. Apply label: `integration-deploy` (backend) or `integration-deploy-user-interface` (UI)
85
+
86
+ ---
87
+
88
+ ## 🔔 Slack Notifications
89
+
90
+ > [!NOTE]
91
+ > The Slack webhook URL below will be populated during `heyteam init`. After initialization, this file (`heyteam-instructions.md`) will be added to `.gitignore` to prevent sensitive information from being committed to the repository.
92
+
93
+ ### Webhook URL
94
+ ```
95
+ WEBHOOK_URL_PLACEHOLDER
96
+ ```
97
+ _This will be replaced with your actual webhook URL during `heyteam init`._
98
+
99
+ ### Payload Structure
100
+ ```json
101
+ {
102
+ "PR_LINK": "{PR_URL}"
103
+ }
104
+ ```
105
+
106
+ ### Curl Command
107
+ ```bash
108
+ curl -X POST -H 'Content-type: application/json' \
109
+ --data '{"PR_LINK": "PR_URL_HERE"}' \
110
+ 'WEBHOOK_URL_PLACEHOLDER'
111
+ ```
112
+ _The webhook URL above will be replaced with your actual URL during initialization._
113
+
114
+ ---
115
+
116
+ ## 🛠️ Required MCP Servers
117
+
118
+ ### Setup Instructions
119
+
120
+ | IDE | How to Configure |
121
+ |-----|-----------------|
122
+ | **VSCode / VSCode Insiders** | Search `@mcp github` and `@mcp atlassian` in the chat panel |
123
+ | **IntelliJ** | Add GitHub and Atlassian MCP server configurations to your MCP settings |
124
+
125
+ ### GitHub MCP Server Tools Reference
126
+
127
+ #### Branch Operations
128
+ - `list_branches` - List all branches (use to find latest release branch)
129
+ - `create_branch` - Create a new branch from a reference
130
+ - `get_branch` - Get details about a specific branch
131
+
132
+ #### Pull Request Operations
133
+ - `create_pull_request` - Create a new pull request
134
+ - `get_pull_request` - Get PR details
135
+ - `list_pull_requests` - List PRs with filters
136
+ - `update_pull_request` - Update PR title, body, or state
137
+
138
+ #### Issue/PR Management
139
+ - `add_issue_labels` - Add labels to an issue/PR
140
+ - `assign_issue` - Assign users to an issue/PR
141
+ - `request_pull_request_review` - Request reviewers for a PR
142
+
143
+ ### Atlassian (Jira) MCP Server Tools Reference
144
+
145
+ - Used for adding comments to Jira tickets during deployments
146
+ - Jira ticket ID is extracted from branch names (pattern: `DTM-XXXX`)
147
+
148
+ ---
149
+
150
+ ## 🎫 Jira Integration
151
+
152
+ ### Ticket ID Extraction
153
+ - Branch name pattern: `feature/DTM-2494-some-description` → Jira ticket `DTM-2494`
154
+ - Only the `DTM-` prefix is supported
155
+
156
+ ### Comment Behavior
157
+ - A meaningful comment is added to the Jira ticket on every ship workflow
158
+ - Comment includes: summary of changes, PR URL (if applicable), and target environment
159
+ - If no Jira ticket ID is found in the branch name, this step is skipped
160
+
161
+ ---
162
+
163
+ ## 📝 Workflow Commands
164
+
165
+ ### ship-code
166
+ Create a PR for code review only (no deployment labels).
167
+ - Target: `develop` branch (or specified branch)
168
+ - Labels: None
169
+ - Assignees/Reviewers: Based on repository
170
+
171
+ ### ship-dev
172
+ Create a PR for development deployment.
173
+ - **Backend (dtm-backend)**:
174
+ - If branch is `deployment/dev/**` → target `deployment/dev/**-trigger`
175
+ - Otherwise → target `develop`
176
+ - Label: `dev-deploy`
177
+ - **UI (dtm)**:
178
+ - If branch is `deployment/dev/**` → target `deployment/dev/**-trigger`
179
+ - Otherwise → target `develop`
180
+ - Label: `dev-deploy-user-interface`
181
+
182
+ ### ship-int
183
+ Create a PR for integration deployment.
184
+ - **Backend (dtm-backend)**:
185
+ - If branch is `deployment/int/**` → target `deployment/int/**-trigger`
186
+ - Otherwise → target latest `release/*` branch or `develop`
187
+ - Label: `integration-deploy`
188
+ - **UI (dtm)**:
189
+ - If branch is `deployment/int/**` → target `deployment/int/**-trigger`
190
+ - Otherwise → target latest `release/*` branch or `develop`
191
+ - Label: `integration-deploy-user-interface`
192
+
193
+ ### ship-prod
194
+ Create a PR for production deployment.
195
+ - **Backend**: Label `prod-deploy`
196
+ - **UI**: Label `integration-deploy-user-interface`
197
+ - Requires multiple approvals
198
+
199
+ ---
200
+
201
+ ## 📖 Usage Examples
202
+
203
+ ### Ship code (no deployment)
204
+ > "Create a PR from my current branch to develop for code review"
205
+
206
+ ### Ship to dev
207
+ > "Ship my current branch to dev environment"
208
+
209
+ ### Ship to int with latest release
210
+ > "Create PR against the latest release branch for integration deployment"
211
+
212
+ ### Ship to prod
213
+ > "Create production PR from integration"
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "heyteam-cli",
3
+ "version": "1.0.0",
4
+ "description": "CLI for setting up HeyTeam AI agents",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "heyteam-cli": "./dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "start": "node dist/index.js",
12
+ "dev": "ts-node src/index.ts"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "ISC",
17
+ "dependencies": {
18
+ "chalk": "^4.1.2",
19
+ "commander": "^11.1.0",
20
+ "fs-extra": "^11.2.0",
21
+ "inquirer": "^8.2.5"
22
+ },
23
+ "devDependencies": {
24
+ "@types/fs-extra": "^11.0.4",
25
+ "@types/inquirer": "^9.0.7",
26
+ "@types/node": "^20.11.5",
27
+ "ts-node": "^10.9.2",
28
+ "typescript": "^5.3.3"
29
+ }
30
+ }