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.
- package/.agent/workflows/ship-code.md +59 -0
- package/.agent/workflows/ship-dev.md +95 -0
- package/.agent/workflows/ship-int.md +96 -0
- package/.agent/workflows/ship-prod.md +94 -0
- package/.agent/workflows/ship-release.md +92 -0
- package/.github/prompts/ship-code.prompt.md +76 -0
- package/.github/prompts/ship-dev.prompt.md +133 -0
- package/.github/prompts/ship-int.prompt.md +140 -0
- package/.github/prompts/ship-prod.prompt.md +131 -0
- package/.github/prompts/ship-release.prompt.md +126 -0
- package/README.md +158 -0
- package/dist/index.js +144 -0
- package/heyteam-cli-1.0.0.tgz +0 -0
- package/heyteam-instructions.md +213 -0
- package/package.json +30 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Commit and push code to current branch - no PR, no Slack, just code push
|
|
3
|
+
---
|
|
4
|
+
// turbo-all
|
|
5
|
+
|
|
6
|
+
# Ship Code (Commit & Push Only)
|
|
7
|
+
|
|
8
|
+
Reference the project configuration from `heyteam-instructions.md`.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
### Required MCP Servers
|
|
13
|
+
This workflow requires **GitHub** and **Atlassian (Jira)** MCP servers to be configured.
|
|
14
|
+
- **VSCode / VSCode Insiders:** Search `@mcp github` and `@mcp atlassian` in the chat panel
|
|
15
|
+
- **IntelliJ:** Add GitHub and Atlassian MCP server configurations to your MCP settings
|
|
16
|
+
|
|
17
|
+
### Repository Access Check
|
|
18
|
+
Verify the authenticated user has access to `digicert/dtm`. **If access is denied, STOP execution.**
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. **Check for uncommitted changes**
|
|
23
|
+
```bash
|
|
24
|
+
git status --porcelain
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. **If there are staged or unstaged changes, generate commit message and commit**
|
|
28
|
+
- Get the diff of changes:
|
|
29
|
+
```bash
|
|
30
|
+
git diff HEAD
|
|
31
|
+
```
|
|
32
|
+
- Generate a professional, meaningful commit message based on the changes
|
|
33
|
+
- Format: `<type>: <description>` (e.g., "feat: add user authentication", "fix: resolve null pointer in login")
|
|
34
|
+
- Commit the changes:
|
|
35
|
+
```bash
|
|
36
|
+
# Add only tracked files (updates/deletions) - do NOT add untracked files
|
|
37
|
+
git add -u
|
|
38
|
+
git commit -m "GENERATED_MESSAGE"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. **Push changes to remote**
|
|
42
|
+
```bash
|
|
43
|
+
git push origin HEAD
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
4. **Get current branch name**
|
|
47
|
+
```bash
|
|
48
|
+
git branch --show-current
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
5. **Add Jira Comment**
|
|
52
|
+
- Extract Jira ticket ID from the current branch name
|
|
53
|
+
- Pattern: look for `DTM-XXXX` in the branch name (e.g., `feature/DTM-2494-some-description` → `DTM-2494`)
|
|
54
|
+
- If found, add a meaningful comment summarizing the changes and commit message
|
|
55
|
+
- If no Jira ticket ID can be extracted, skip this step
|
|
56
|
+
|
|
57
|
+
## Return
|
|
58
|
+
|
|
59
|
+
Report the commit message generated, push status, and Jira comment status (added, skipped, or ticket not found). That's it - no PR creation.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Ship to dev environment - creates PR with dev-deploy labels, optional Slack notification
|
|
3
|
+
---
|
|
4
|
+
// turbo-all
|
|
5
|
+
|
|
6
|
+
# Ship to Development
|
|
7
|
+
|
|
8
|
+
Reference the project configuration from `heyteam-instructions.md`.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
### Required MCP Servers
|
|
13
|
+
This workflow requires **GitHub** and **Atlassian (Jira)** MCP servers to be configured.
|
|
14
|
+
- **VSCode / VSCode Insiders:** Search `@mcp github` and `@mcp atlassian` in the chat panel
|
|
15
|
+
- **IntelliJ:** Add GitHub and Atlassian MCP server configurations to your MCP settings
|
|
16
|
+
|
|
17
|
+
### Repository Access Check
|
|
18
|
+
Verify the authenticated user has access to `digicert/dtm`. **If access is denied, STOP execution.**
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. **Check for uncommitted changes**
|
|
23
|
+
```bash
|
|
24
|
+
git status --porcelain
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. **If there are staged or unstaged changes, generate commit message and commit**
|
|
28
|
+
- Get the diff of changes:
|
|
29
|
+
```bash
|
|
30
|
+
git diff HEAD
|
|
31
|
+
```
|
|
32
|
+
- Generate a professional, meaningful commit message based on the changes
|
|
33
|
+
- Format: `<type>: <description>` (e.g., "feat: add user authentication", "fix: resolve null pointer in login")
|
|
34
|
+
- Commit the changes:
|
|
35
|
+
```bash
|
|
36
|
+
# Add only tracked files (updates/deletions) - do NOT add untracked files
|
|
37
|
+
git add -u
|
|
38
|
+
git commit -m "GENERATED_MESSAGE"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. **Push changes to remote**
|
|
42
|
+
```bash
|
|
43
|
+
git push origin HEAD
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
4. **Identify the repository**
|
|
47
|
+
```bash
|
|
48
|
+
git remote -v
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
5. **Get current branch**
|
|
52
|
+
```bash
|
|
53
|
+
git branch --show-current
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
6. **Determine target branch and label:**
|
|
57
|
+
|
|
58
|
+
**Backend (dtm-backend):**
|
|
59
|
+
- If branch starts with `deployment/dev/` → target is `{branch}-trigger`, label is `dev-deploy`
|
|
60
|
+
- Otherwise → target is `develop`, label is `dev-deploy`
|
|
61
|
+
|
|
62
|
+
**UI (dtm):**
|
|
63
|
+
- If branch starts with `deployment/dev/` → target is `{branch}-trigger`, label is `dev-deploy-user-interface`
|
|
64
|
+
- Otherwise → target is `develop`, label is `dev-deploy-user-interface`
|
|
65
|
+
|
|
66
|
+
7. **Check if an open PR already exists**
|
|
67
|
+
|
|
68
|
+
8. **Create or update PR with the determined target branch**
|
|
69
|
+
|
|
70
|
+
9. **Add the appropriate dev label**
|
|
71
|
+
|
|
72
|
+
10. **Get current GitHub username and add assignees/reviewers (filtered):**
|
|
73
|
+
- Get authenticated user's GitHub username
|
|
74
|
+
- Define team lists based on repository:
|
|
75
|
+
- **UI (dtm)**: priti-kumari-dc, surbhi-gupta-dc, shiva-burade-dc
|
|
76
|
+
- **Backend (dtm-backend)**: jaydeep-raval-dc, swaraj-dhumale-dc, sharmajetesh, shiva-burade-dc
|
|
77
|
+
- **Filter out the PR creator** from both assignees and reviewers lists
|
|
78
|
+
|
|
79
|
+
11. **Add Jira Comment**
|
|
80
|
+
- Extract Jira ticket ID from the current branch name
|
|
81
|
+
- Pattern: look for `DTM-XXXX` in the branch name (e.g., `feature/DTM-2494-some-description` → `DTM-2494`)
|
|
82
|
+
- If found, add a meaningful comment summarizing the changes, PR URL, and target environment (Development)
|
|
83
|
+
- If no Jira ticket ID can be extracted, skip this step
|
|
84
|
+
|
|
85
|
+
12. **[OPTIONAL] Send Slack notification (default: OFF)**
|
|
86
|
+
- Only send if explicitly requested by user
|
|
87
|
+
```bash
|
|
88
|
+
curl -X POST -H 'Content-type: application/json' \
|
|
89
|
+
--data '{"PR_LINK": "PR_URL_HERE"}' \
|
|
90
|
+
'{{SLACK_WEBHOOK_URL}}'
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Return
|
|
94
|
+
|
|
95
|
+
Report the PR URL, commit message used, target branch, label, assignees, reviewers, Jira comment status, and Slack status (sent or skipped).
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Ship to int environment - creates PR with integration labels, supports release branch lookup
|
|
3
|
+
---
|
|
4
|
+
// turbo-all
|
|
5
|
+
|
|
6
|
+
# Ship to Integration
|
|
7
|
+
|
|
8
|
+
Reference the project configuration from `heyteam-instructions.md`.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
### Required MCP Servers
|
|
13
|
+
This workflow requires **GitHub** and **Atlassian (Jira)** MCP servers to be configured.
|
|
14
|
+
- **VSCode / VSCode Insiders:** Search `@mcp github` and `@mcp atlassian` in the chat panel
|
|
15
|
+
- **IntelliJ:** Add GitHub and Atlassian MCP server configurations to your MCP settings
|
|
16
|
+
|
|
17
|
+
### Repository Access Check
|
|
18
|
+
Verify the authenticated user has access to `digicert/dtm`. **If access is denied, STOP execution.**
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. **Check for uncommitted changes**
|
|
23
|
+
```bash
|
|
24
|
+
git status --porcelain
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. **If there are staged or unstaged changes, generate commit message and commit**
|
|
28
|
+
- Get the diff of changes:
|
|
29
|
+
```bash
|
|
30
|
+
git diff HEAD
|
|
31
|
+
```
|
|
32
|
+
- Generate a professional, meaningful commit message based on the changes
|
|
33
|
+
- Format: `<type>: <description>` (e.g., "feat: add user authentication", "fix: resolve null pointer in login")
|
|
34
|
+
- Commit the changes:
|
|
35
|
+
```bash
|
|
36
|
+
# Add only tracked files (updates/deletions) - do NOT add untracked files
|
|
37
|
+
git add -u
|
|
38
|
+
git commit -m "GENERATED_MESSAGE"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. **Push changes to remote**
|
|
42
|
+
```bash
|
|
43
|
+
git push origin HEAD
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
4. **Identify the repository**
|
|
47
|
+
```bash
|
|
48
|
+
git remote -v
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
5. **Get current branch**
|
|
52
|
+
```bash
|
|
53
|
+
git branch --show-current
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
6. **Determine target branch and label:**
|
|
57
|
+
|
|
58
|
+
**Backend (dtm-backend):**
|
|
59
|
+
- If branch starts with `deployment/int/` → target is `{branch}-trigger`, label is `integration-deploy`
|
|
60
|
+
- If "latest release" requested → use `list_branches` to find latest `release/*` branch, label is `integration-deploy`
|
|
61
|
+
- Otherwise → target is `develop`, label is `integration-deploy`
|
|
62
|
+
|
|
63
|
+
**UI (dtm):**
|
|
64
|
+
- If branch starts with `deployment/int/` → target is `{branch}-trigger`, label is `integration-deploy-user-interface`
|
|
65
|
+
- If "latest release" requested → use `list_branches` to find latest `release/*` branch, label is `integration-deploy-user-interface`
|
|
66
|
+
- Otherwise → target is `develop`, label is `integration-deploy-user-interface`
|
|
67
|
+
|
|
68
|
+
7. **Check if an open PR already exists**
|
|
69
|
+
|
|
70
|
+
8. **Create or update PR with the determined target branch**
|
|
71
|
+
|
|
72
|
+
9. **Add the appropriate integration label**
|
|
73
|
+
|
|
74
|
+
10. **Get current GitHub username and add assignees/reviewers (filtered):**
|
|
75
|
+
- Get authenticated user's GitHub username
|
|
76
|
+
- Define team lists based on repository:
|
|
77
|
+
- **UI (dtm)**: priti-kumari-dc, surbhi-gupta-dc, shiva-burade-dc
|
|
78
|
+
- **Backend (dtm-backend)**: jaydeep-raval-dc, swaraj-dhumale-dc, sharmajetesh, shiva-burade-dc
|
|
79
|
+
- **Filter out the PR creator** from both assignees and reviewers lists
|
|
80
|
+
|
|
81
|
+
11. **Add Jira Comment**
|
|
82
|
+
- Extract Jira ticket ID from the current branch name
|
|
83
|
+
- Pattern: look for `DTM-XXXX` in the branch name (e.g., `feature/DTM-2494-some-description` → `DTM-2494`)
|
|
84
|
+
- If found, add a meaningful comment summarizing the changes, PR URL, and target environment (Integration)
|
|
85
|
+
- If no Jira ticket ID can be extracted, skip this step
|
|
86
|
+
|
|
87
|
+
12. **Send Slack notification:**
|
|
88
|
+
```bash
|
|
89
|
+
curl -X POST -H 'Content-type: application/json' \
|
|
90
|
+
--data '{"PR_LINK": "PR_URL_HERE"}' \
|
|
91
|
+
'{{SLACK_WEBHOOK_URL}}'
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Return
|
|
95
|
+
|
|
96
|
+
Report the PR URL, commit message used, target branch, label, assignees, reviewers, Jira comment status, and Slack status.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Ship to prod environment - creates PR with production labels, requires multiple approvals
|
|
3
|
+
---
|
|
4
|
+
// turbo-all
|
|
5
|
+
|
|
6
|
+
# Ship to Production
|
|
7
|
+
|
|
8
|
+
⚠️ **PRODUCTION DEPLOYMENT** - Requires multiple approvals
|
|
9
|
+
|
|
10
|
+
Reference the project configuration from `heyteam-instructions.md`.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
### Required MCP Servers
|
|
15
|
+
This workflow requires **GitHub** and **Atlassian (Jira)** MCP servers to be configured.
|
|
16
|
+
- **VSCode / VSCode Insiders:** Search `@mcp github` and `@mcp atlassian` in the chat panel
|
|
17
|
+
- **IntelliJ:** Add GitHub and Atlassian MCP server configurations to your MCP settings
|
|
18
|
+
|
|
19
|
+
### Repository Access Check
|
|
20
|
+
Verify the authenticated user has access to `digicert/dtm`. **If access is denied, STOP execution.**
|
|
21
|
+
|
|
22
|
+
## Steps
|
|
23
|
+
|
|
24
|
+
1. **Check for uncommitted changes**
|
|
25
|
+
```bash
|
|
26
|
+
git status --porcelain
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. **If there are staged or unstaged changes, generate commit message and commit**
|
|
30
|
+
- Get the diff of changes:
|
|
31
|
+
```bash
|
|
32
|
+
git diff HEAD
|
|
33
|
+
```
|
|
34
|
+
- Generate a professional, meaningful commit message based on the changes
|
|
35
|
+
- Format: `<type>: <description>` (e.g., "feat: add user authentication", "fix: resolve null pointer in login")
|
|
36
|
+
- Commit the changes:
|
|
37
|
+
```bash
|
|
38
|
+
# Add only tracked files (updates/deletions) - do NOT add untracked files
|
|
39
|
+
git add -u
|
|
40
|
+
git commit -m "GENERATED_MESSAGE"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. **Push changes to remote**
|
|
44
|
+
```bash
|
|
45
|
+
git push origin HEAD
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
4. **Identify the repository**
|
|
49
|
+
```bash
|
|
50
|
+
git remote -v
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
5. **Get current branch**
|
|
54
|
+
```bash
|
|
55
|
+
git branch --show-current
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
6. **Determine label:**
|
|
59
|
+
- **Backend (dtm-backend)**: `prod-deploy`
|
|
60
|
+
- **UI (dtm)**: `integration-deploy-user-interface`
|
|
61
|
+
|
|
62
|
+
7. **Verify CI/CD checks have passed on source branch**
|
|
63
|
+
|
|
64
|
+
8. **Check if an open PR already exists**
|
|
65
|
+
|
|
66
|
+
9. **Create or update PR:**
|
|
67
|
+
- Title: "Production Release - [DATE]"
|
|
68
|
+
- Include summary of all changes
|
|
69
|
+
|
|
70
|
+
10. **Add the appropriate production label**
|
|
71
|
+
|
|
72
|
+
11. **Get current GitHub username and add ALL team members as assignees/reviewers (filtered):**
|
|
73
|
+
- Get authenticated user's GitHub username
|
|
74
|
+
- Define team lists based on repository:
|
|
75
|
+
- **UI (dtm)**: priti-kumari-dc, surbhi-gupta-dc, shiva-burade-dc
|
|
76
|
+
- **Backend (dtm-backend)**: jaydeep-raval-dc, swaraj-dhumale-dc, sharmajetesh, shiva-burade-dc
|
|
77
|
+
- **Filter out the PR creator** from both assignees and reviewers lists
|
|
78
|
+
|
|
79
|
+
12. **Add Jira Comment**
|
|
80
|
+
- Extract Jira ticket ID from the current branch name
|
|
81
|
+
- Pattern: look for `DTM-XXXX` in the branch name (e.g., `feature/DTM-2494-some-description` → `DTM-2494`)
|
|
82
|
+
- If found, add a meaningful comment summarizing the changes, PR URL, and target environment (Production)
|
|
83
|
+
- If no Jira ticket ID can be extracted, skip this step
|
|
84
|
+
|
|
85
|
+
13. **Send Slack notification:**
|
|
86
|
+
```bash
|
|
87
|
+
curl -X POST -H 'Content-type: application/json' \
|
|
88
|
+
--data '{"PR_LINK": "PR_URL_HERE"}' \
|
|
89
|
+
'{{SLACK_WEBHOOK_URL}}'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Return
|
|
93
|
+
|
|
94
|
+
Report the PR URL, commit message used, label, assignees, reviewers, Jira comment status, Slack status, and remind that multiple approvals are required.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Ship to release branch - creates PR against latest release branch with appropriate labels
|
|
3
|
+
---
|
|
4
|
+
// turbo-all
|
|
5
|
+
|
|
6
|
+
# Ship to Release
|
|
7
|
+
|
|
8
|
+
Reference the project configuration from `heyteam-instructions.md`.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
### Required MCP Servers
|
|
13
|
+
This workflow requires **GitHub** and **Atlassian (Jira)** MCP servers to be configured.
|
|
14
|
+
- **VSCode / VSCode Insiders:** Search `@mcp github` and `@mcp atlassian` in the chat panel
|
|
15
|
+
- **IntelliJ:** Add GitHub and Atlassian MCP server configurations to your MCP settings
|
|
16
|
+
|
|
17
|
+
### Repository Access Check
|
|
18
|
+
Verify the authenticated user has access to `digicert/dtm`. **If access is denied, STOP execution.**
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. **Check for uncommitted changes**
|
|
23
|
+
```bash
|
|
24
|
+
git status --porcelain
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. **If there are staged or unstaged changes, generate commit message and commit**
|
|
28
|
+
- Get the diff of changes:
|
|
29
|
+
```bash
|
|
30
|
+
git diff HEAD
|
|
31
|
+
```
|
|
32
|
+
- Generate a professional, meaningful commit message based on the changes
|
|
33
|
+
- Format: `<type>: <description>` (e.g., "feat: add user authentication", "fix: resolve null pointer in login")
|
|
34
|
+
- Commit the changes:
|
|
35
|
+
```bash
|
|
36
|
+
# Add only tracked files (updates/deletions) - do NOT add untracked files
|
|
37
|
+
git add -u
|
|
38
|
+
git commit -m "GENERATED_MESSAGE"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. **Push changes to remote**
|
|
42
|
+
```bash
|
|
43
|
+
git push origin HEAD
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
4. **Identify the repository**
|
|
47
|
+
```bash
|
|
48
|
+
git remote -v
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
5. **Get current branch**
|
|
52
|
+
```bash
|
|
53
|
+
git branch --show-current
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
6. **Find latest release branch**
|
|
57
|
+
- Use `list_branches` to find branches matching `release/*`
|
|
58
|
+
- Sort by creation date, use the most recent
|
|
59
|
+
|
|
60
|
+
7. **Determine label based on repository:**
|
|
61
|
+
- **Backend (dtm-backend)**: `integration-deploy`
|
|
62
|
+
- **UI (dtm)**: `integration-deploy-user-interface`
|
|
63
|
+
|
|
64
|
+
8. **Check if an open PR already exists from current branch to the release branch**
|
|
65
|
+
|
|
66
|
+
9. **Create or update PR:**
|
|
67
|
+
- Target: latest `release/*` branch found in step 6
|
|
68
|
+
- Add the appropriate label from step 7
|
|
69
|
+
|
|
70
|
+
10. **Get current GitHub username and add assignees/reviewers (filtered):**
|
|
71
|
+
- Get authenticated user's GitHub username
|
|
72
|
+
- Define team lists based on repository:
|
|
73
|
+
- **UI (dtm)**: priti-kumari-dc, surbhi-gupta-dc, shiva-burade-dc
|
|
74
|
+
- **Backend (dtm-backend)**: jaydeep-raval-dc, swaraj-dhumale-dc, sharmajetesh, shiva-burade-dc
|
|
75
|
+
- **Filter out the PR creator** from both assignees and reviewers lists
|
|
76
|
+
|
|
77
|
+
11. **Add Jira Comment**
|
|
78
|
+
- Extract Jira ticket ID from the current branch name
|
|
79
|
+
- Pattern: look for `DTM-XXXX` in the branch name (e.g., `feature/DTM-2494-some-description` → `DTM-2494`)
|
|
80
|
+
- If found, add a meaningful comment summarizing the changes, PR URL, and target environment (Release)
|
|
81
|
+
- If no Jira ticket ID can be extracted, skip this step
|
|
82
|
+
|
|
83
|
+
12. **[MANDATORY] Send Slack notification:**
|
|
84
|
+
```bash
|
|
85
|
+
curl -X POST -H 'Content-type: application/json' \
|
|
86
|
+
--data '{"PR_LINK": "PR_URL_HERE"}' \
|
|
87
|
+
'{{SLACK_WEBHOOK_URL}}'
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Return
|
|
91
|
+
|
|
92
|
+
Report the PR URL, commit message used, release branch used, label, assignees, reviewers, Jira comment status, and Slack status.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Ship Code (Commit & Push Only)
|
|
2
|
+
|
|
3
|
+
**Context**: Read the project configuration from `heyteam-instructions.md`.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
### Required MCP Servers
|
|
8
|
+
|
|
9
|
+
This workflow requires **GitHub** and **Atlassian (Jira)** MCP servers to be configured.
|
|
10
|
+
|
|
11
|
+
> [!IMPORTANT]
|
|
12
|
+
> **For VSCode / VSCode Insiders:**
|
|
13
|
+
> Search `@mcp github` and `@mcp atlassian` in the chat panel to configure MCP servers.
|
|
14
|
+
>
|
|
15
|
+
> **For IntelliJ:**
|
|
16
|
+
> Add the GitHub and Atlassian MCP server configurations to your MCP settings.
|
|
17
|
+
|
|
18
|
+
### Repository Access Check
|
|
19
|
+
|
|
20
|
+
Before proceeding, verify that the authenticated user has access to the `digicert/dtm` repository:
|
|
21
|
+
- Use GitHub MCP tools to check access to `digicert/dtm`
|
|
22
|
+
- **If access is denied, STOP execution immediately** and inform the user
|
|
23
|
+
|
|
24
|
+
## Task
|
|
25
|
+
|
|
26
|
+
Commit and push code to current branch. No PR creation, no Slack notification.
|
|
27
|
+
|
|
28
|
+
## Steps
|
|
29
|
+
|
|
30
|
+
1. **Check for uncommitted changes**
|
|
31
|
+
```bash
|
|
32
|
+
git status --porcelain
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
2. **If there are staged or unstaged changes, generate commit message and commit**
|
|
36
|
+
- Get the diff of changes:
|
|
37
|
+
```bash
|
|
38
|
+
git diff HEAD
|
|
39
|
+
```
|
|
40
|
+
- Analyze the changes and generate a professional, meaningful commit message
|
|
41
|
+
- Use conventional commit format: `<type>: <description>`
|
|
42
|
+
- Types: feat, fix, docs, style, refactor, test, chore
|
|
43
|
+
- Example: "feat: add user authentication module"
|
|
44
|
+
- Commit the changes:
|
|
45
|
+
```bash
|
|
46
|
+
# Add only tracked files (updates/deletions) - do NOT add untracked files unless explicitly asked
|
|
47
|
+
git add -u
|
|
48
|
+
git commit -m "GENERATED_MESSAGE"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
3. **Push changes to remote**
|
|
52
|
+
```bash
|
|
53
|
+
git push origin HEAD
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
4. **Get current branch name**
|
|
57
|
+
```bash
|
|
58
|
+
git branch --show-current
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
5. **Add Jira Comment**
|
|
62
|
+
- Extract Jira ticket ID from the current branch name
|
|
63
|
+
- Pattern: look for `DTM-XXXX` in the branch name (e.g., `feature/DTM-2494-some-description` → `DTM-2494`)
|
|
64
|
+
- If a Jira ticket ID is found, add a meaningful comment to the ticket summarizing:
|
|
65
|
+
- What changes were made (based on the diff)
|
|
66
|
+
- The commit message used
|
|
67
|
+
- If no Jira ticket ID can be extracted, skip this step
|
|
68
|
+
|
|
69
|
+
## Expected Output
|
|
70
|
+
|
|
71
|
+
Report back with:
|
|
72
|
+
- Commit message generated (if any)
|
|
73
|
+
- Push status
|
|
74
|
+
- Jira comment status (added, skipped, or ticket not found)
|
|
75
|
+
|
|
76
|
+
That's it - no PR, no Slack, just code push.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Ship to Development
|
|
2
|
+
|
|
3
|
+
**Context**: Read the project configuration from `heyteam-instructions.md`.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
### Required MCP Servers
|
|
8
|
+
|
|
9
|
+
This workflow requires **GitHub** and **Atlassian (Jira)** MCP servers to be configured.
|
|
10
|
+
|
|
11
|
+
> [!IMPORTANT]
|
|
12
|
+
> **For VSCode / VSCode Insiders:**
|
|
13
|
+
> Search `@mcp github` and `@mcp atlassian` in the chat panel to configure MCP servers.
|
|
14
|
+
>
|
|
15
|
+
> **For IntelliJ:**
|
|
16
|
+
> Add the GitHub and Atlassian MCP server configurations to your MCP settings.
|
|
17
|
+
|
|
18
|
+
### Repository Access Check
|
|
19
|
+
|
|
20
|
+
Before proceeding, verify that the authenticated user has access to the `digicert/dtm` repository:
|
|
21
|
+
- Use GitHub MCP tools to check access to `digicert/dtm`
|
|
22
|
+
- **If access is denied, STOP execution immediately** and inform the user
|
|
23
|
+
|
|
24
|
+
## Task
|
|
25
|
+
|
|
26
|
+
Create a Pull Request for development deployment.
|
|
27
|
+
|
|
28
|
+
## Steps
|
|
29
|
+
|
|
30
|
+
1. **Check for uncommitted changes**
|
|
31
|
+
```bash
|
|
32
|
+
git status --porcelain
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
2. **If there are staged or unstaged changes, generate commit message and commit**
|
|
36
|
+
- Get the diff of changes:
|
|
37
|
+
```bash
|
|
38
|
+
git diff HEAD
|
|
39
|
+
```
|
|
40
|
+
- Analyze the changes and generate a professional, meaningful commit message
|
|
41
|
+
- Use conventional commit format: `<type>: <description>`
|
|
42
|
+
- Types: feat, fix, docs, style, refactor, test, chore
|
|
43
|
+
- Example: "feat: add user authentication module"
|
|
44
|
+
- Commit the changes:
|
|
45
|
+
```bash
|
|
46
|
+
# Add only tracked files (updates/deletions) - do NOT add untracked files unless explicitly asked
|
|
47
|
+
git add -u
|
|
48
|
+
git commit -m "GENERATED_MESSAGE"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
3. **Push changes to remote**
|
|
52
|
+
```bash
|
|
53
|
+
git push origin HEAD
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
4. **Identify repository**
|
|
57
|
+
- Check if current repo is `digicert/dtm` (UI) or `digicert/dtm-backend` (Backend)
|
|
58
|
+
|
|
59
|
+
5. **Get current branch name**
|
|
60
|
+
```bash
|
|
61
|
+
git branch --show-current
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
6. **Determine target branch and label**
|
|
65
|
+
|
|
66
|
+
**If Backend repo (dtm-backend):**
|
|
67
|
+
- If branch matches `deployment/dev/**`:
|
|
68
|
+
- Target: `{current-branch}-trigger` (append `-trigger`)
|
|
69
|
+
- Label: `dev-deploy`
|
|
70
|
+
- Otherwise:
|
|
71
|
+
- Target: `develop`
|
|
72
|
+
- Label: `dev-deploy`
|
|
73
|
+
|
|
74
|
+
**If UI repo (dtm):**
|
|
75
|
+
- If branch matches `deployment/dev/**`:
|
|
76
|
+
- Target: `{current-branch}-trigger` (append `-trigger`)
|
|
77
|
+
- Label: `dev-deploy-user-interface`
|
|
78
|
+
- Otherwise:
|
|
79
|
+
- Target: `develop`
|
|
80
|
+
- Label: `dev-deploy-user-interface`
|
|
81
|
+
|
|
82
|
+
7. **Check for existing PR**
|
|
83
|
+
- Use `list_pull_requests` to check if an open PR already exists
|
|
84
|
+
|
|
85
|
+
8. **Create or Update PR**
|
|
86
|
+
- Use `create_pull_request` with:
|
|
87
|
+
- `owner`: `digicert`
|
|
88
|
+
- `repo`: `dtm` or `dtm-backend`
|
|
89
|
+
- `head`: current branch
|
|
90
|
+
- `base`: determined target branch
|
|
91
|
+
- `title`: Generate from branch name
|
|
92
|
+
- `body`: Summary of changes
|
|
93
|
+
|
|
94
|
+
9. **Add Label**
|
|
95
|
+
- Use `add_issue_labels` to add the appropriate dev label
|
|
96
|
+
|
|
97
|
+
10. **Get current GitHub username and add Assignees/Reviewers (filtered)**
|
|
98
|
+
- Get the authenticated user's GitHub username
|
|
99
|
+
- Define team lists based on repository:
|
|
100
|
+
- **If UI repo (dtm)**: priti-kumari-dc, surbhi-gupta-dc, shiva-burade-dc
|
|
101
|
+
- **If Backend repo (dtm-backend)**: jaydeep-raval-dc, swaraj-dhumale-dc, sharmajetesh, shiva-burade-dc
|
|
102
|
+
- **Filter out the PR creator** from both assignees and reviewers lists
|
|
103
|
+
- Use `assign_issue` for assignees
|
|
104
|
+
- Use `request_pull_request_review` for reviewers
|
|
105
|
+
|
|
106
|
+
11. **Add Jira Comment**
|
|
107
|
+
- Extract Jira ticket ID from the current branch name
|
|
108
|
+
- Pattern: look for `DTM-XXXX` in the branch name (e.g., `feature/DTM-2494-some-description` → `DTM-2494`)
|
|
109
|
+
- If a Jira ticket ID is found, add a meaningful comment to the ticket summarizing:
|
|
110
|
+
- What changes were made (based on the diff)
|
|
111
|
+
- The PR URL
|
|
112
|
+
- The target environment (Development)
|
|
113
|
+
- If no Jira ticket ID can be extracted, skip this step
|
|
114
|
+
|
|
115
|
+
12. **[OPTIONAL] Send Slack Notification (default: OFF)**
|
|
116
|
+
- Only send if explicitly requested by user
|
|
117
|
+
```bash
|
|
118
|
+
curl -X POST -H 'Content-type: application/json' \
|
|
119
|
+
--data '{"PR_LINK": "PR_URL_HERE"}' \
|
|
120
|
+
'{{SLACK_WEBHOOK_URL}}'
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Expected Output
|
|
124
|
+
|
|
125
|
+
Report back with:
|
|
126
|
+
- Commit message generated (if any)
|
|
127
|
+
- PR URL
|
|
128
|
+
- Target branch
|
|
129
|
+
- Label added (`dev-deploy` or `dev-deploy-user-interface`)
|
|
130
|
+
- Assignees added (excluding PR creator)
|
|
131
|
+
- Reviewers requested (excluding PR creator)
|
|
132
|
+
- Jira comment status (added, skipped, or ticket not found)
|
|
133
|
+
- Slack notification status (sent or skipped)
|