@codyswann/lisa 1.52.2 → 1.52.4
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/dist/core/config.d.ts +2 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +5 -0
- package/dist/core/lisa.js.map +1 -1
- package/expo/create-only/.github/workflows/ci.yml +2 -2
- package/expo/create-only/.github/workflows/deploy.yml +1 -1
- package/expo/deletions.json +8 -0
- package/nestjs/create-only/.github/workflows/ci.yml +1 -1
- package/nestjs/create-only/.github/workflows/deploy.yml +1 -1
- package/nestjs/deletions.json +7 -1
- package/package.json +1 -1
- package/typescript/create-only/.github/workflows/auto-update-pr-branches.yml +24 -0
- package/typescript/create-only/.github/workflows/claude-ci-auto-fix.yml +20 -0
- package/typescript/create-only/.github/workflows/claude-code-review-response.yml +20 -0
- package/typescript/create-only/.github/workflows/claude-deploy-auto-fix.yml +20 -0
- package/typescript/create-only/.github/workflows/claude-nightly-code-complexity.yml +14 -0
- package/typescript/create-only/.github/workflows/claude-nightly-test-coverage.yml +14 -0
- package/typescript/create-only/.github/workflows/claude-nightly-test-improvement.yml +25 -0
- package/typescript/create-only/.github/workflows/claude.yml +25 -0
- package/typescript/deletions.json +20 -0
- package/expo/copy-overwrite/.github/workflows/build.yml +0 -75
- package/expo/copy-overwrite/.github/workflows/lighthouse.yml +0 -88
- package/expo/copy-overwrite/.github/workflows/zap-baseline.yml +0 -107
- package/nestjs/copy-overwrite/.github/workflows/load-test.yml +0 -285
- package/nestjs/copy-overwrite/.github/workflows/zap-baseline.yml +0 -123
- package/typescript/copy-overwrite/.github/workflows/auto-update-pr-branches.yml +0 -45
- package/typescript/copy-overwrite/.github/workflows/claude-ci-auto-fix.yml +0 -145
- package/typescript/copy-overwrite/.github/workflows/claude-code-review-response.yml +0 -112
- package/typescript/copy-overwrite/.github/workflows/claude-deploy-auto-fix.yml +0 -143
- package/typescript/copy-overwrite/.github/workflows/claude-nightly-code-complexity.yml +0 -130
- package/typescript/copy-overwrite/.github/workflows/claude-nightly-test-coverage.yml +0 -127
- package/typescript/copy-overwrite/.github/workflows/claude-nightly-test-improvement.yml +0 -129
- package/typescript/copy-overwrite/.github/workflows/claude.yml +0 -55
- package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +0 -115
- package/typescript/copy-overwrite/.github/workflows/create-issue-on-failure.yml +0 -176
- package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +0 -197
- package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +0 -269
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
# This file is managed by Lisa.
|
|
2
|
-
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
3
|
-
# -----------------------------------------------------------------------------
|
|
4
|
-
# Sentry Issue Creation Workflow
|
|
5
|
-
# -----------------------------------------------------------------------------
|
|
6
|
-
# ⚠️ WARNING: THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY! ⚠️
|
|
7
|
-
# Any changes may be overwritten by the generation process.
|
|
8
|
-
# This workflow creates a Sentry issue when another workflow fails.
|
|
9
|
-
# It captures details about the failure and creates a standardized issue
|
|
10
|
-
# to help track and resolve CI/CD problems in Sentry.
|
|
11
|
-
#
|
|
12
|
-
# Example usage in another workflow:
|
|
13
|
-
# ```yaml
|
|
14
|
-
# create_sentry_issue_on_failure:
|
|
15
|
-
# if: failure()
|
|
16
|
-
# uses: ./.github/workflows/create-sentry-issue-on-failure.yml
|
|
17
|
-
# with:
|
|
18
|
-
# workflow_name: 'My Workflow'
|
|
19
|
-
# failed_job: 'build_and_test'
|
|
20
|
-
# SENTRY_ORG: ${{ vars.SENTRY_ORG }}
|
|
21
|
-
# SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
|
|
22
|
-
# secrets:
|
|
23
|
-
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
24
|
-
# ```
|
|
25
|
-
|
|
26
|
-
name: 🔴 Sentry Issue on Workflow Failure
|
|
27
|
-
|
|
28
|
-
on:
|
|
29
|
-
workflow_call:
|
|
30
|
-
inputs:
|
|
31
|
-
workflow_name:
|
|
32
|
-
required: true
|
|
33
|
-
type: string
|
|
34
|
-
description: 'Name of the workflow that failed'
|
|
35
|
-
failed_job:
|
|
36
|
-
required: false
|
|
37
|
-
type: string
|
|
38
|
-
description: 'Name of the job that failed (optional)'
|
|
39
|
-
SENTRY_ORG:
|
|
40
|
-
required: true
|
|
41
|
-
type: string
|
|
42
|
-
description: 'Sentry organization slug (e.g., your-company)'
|
|
43
|
-
SENTRY_PROJECT:
|
|
44
|
-
required: true
|
|
45
|
-
type: string
|
|
46
|
-
description: 'Sentry project slug (e.g., serverless-knowledge-platform)'
|
|
47
|
-
environment:
|
|
48
|
-
required: false
|
|
49
|
-
type: string
|
|
50
|
-
default: 'production'
|
|
51
|
-
description: 'Environment where the failure occurred'
|
|
52
|
-
level:
|
|
53
|
-
required: false
|
|
54
|
-
type: string
|
|
55
|
-
default: 'error'
|
|
56
|
-
description: 'Sentry issue level (debug, info, warning, error, fatal)'
|
|
57
|
-
node_version:
|
|
58
|
-
description: 'Node.js version to use'
|
|
59
|
-
required: false
|
|
60
|
-
default: '22.21.1'
|
|
61
|
-
type: string
|
|
62
|
-
package_manager:
|
|
63
|
-
description: 'Package manager to use (npm, yarn, or bun)'
|
|
64
|
-
required: false
|
|
65
|
-
default: 'npm'
|
|
66
|
-
type: string
|
|
67
|
-
working_directory:
|
|
68
|
-
description: 'Directory to run commands in (if not root)'
|
|
69
|
-
required: false
|
|
70
|
-
default: ''
|
|
71
|
-
type: string
|
|
72
|
-
secrets:
|
|
73
|
-
SENTRY_AUTH_TOKEN:
|
|
74
|
-
required: true
|
|
75
|
-
description: 'Sentry Auth Token with project:write scope'
|
|
76
|
-
|
|
77
|
-
# Concurrency is managed by the parent workflow that calls this one
|
|
78
|
-
# This avoids deadlocks between parent and child workflows
|
|
79
|
-
|
|
80
|
-
jobs:
|
|
81
|
-
create_sentry_issue:
|
|
82
|
-
name: 📝 Create Sentry Issue
|
|
83
|
-
runs-on: ubuntu-latest
|
|
84
|
-
timeout-minutes: 5
|
|
85
|
-
steps:
|
|
86
|
-
- name: 📥 Checkout repository
|
|
87
|
-
uses: actions/checkout@v4
|
|
88
|
-
|
|
89
|
-
- name: 🔧 Setup Node.js
|
|
90
|
-
uses: actions/setup-node@v4
|
|
91
|
-
with:
|
|
92
|
-
node-version: ${{ inputs.node_version }}
|
|
93
|
-
cache: ${{ inputs.package_manager != 'bun' && inputs.package_manager || '' }}
|
|
94
|
-
|
|
95
|
-
- name: 🔴 Create Sentry Issue
|
|
96
|
-
id: create_sentry_issue
|
|
97
|
-
run: |
|
|
98
|
-
cd "${{ inputs.working_directory || '.' }}"
|
|
99
|
-
|
|
100
|
-
# Set variables
|
|
101
|
-
WORKFLOW_NAME="${{ inputs.workflow_name }}"
|
|
102
|
-
FAILED_JOB="${{ inputs.failed_job || 'Unknown' }}"
|
|
103
|
-
ENVIRONMENT="${{ inputs.environment }}"
|
|
104
|
-
LEVEL="${{ inputs.level }}"
|
|
105
|
-
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
106
|
-
|
|
107
|
-
# Get commit message, handling special characters properly
|
|
108
|
-
COMMIT_MESSAGE="${{ github.event.head_commit.message || 'N/A' }}"
|
|
109
|
-
|
|
110
|
-
# Create error message
|
|
111
|
-
if [ "$FAILED_JOB" != "Unknown" ]; then
|
|
112
|
-
ERROR_MESSAGE="CI/CD Workflow Failure: ${WORKFLOW_NAME} - ${FAILED_JOB}"
|
|
113
|
-
else
|
|
114
|
-
ERROR_MESSAGE="CI/CD Workflow Failure: ${WORKFLOW_NAME}"
|
|
115
|
-
fi
|
|
116
|
-
|
|
117
|
-
# Get current timestamp in ISO format
|
|
118
|
-
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
|
|
119
|
-
|
|
120
|
-
# Create JSON payload for Sentry API using jq for proper escaping
|
|
121
|
-
PAYLOAD=$(jq -n \
|
|
122
|
-
--arg message "${ERROR_MESSAGE}" \
|
|
123
|
-
--arg level "${LEVEL}" \
|
|
124
|
-
--arg timestamp "${TIMESTAMP}" \
|
|
125
|
-
--arg workflow_name "${WORKFLOW_NAME}" \
|
|
126
|
-
--arg failed_job "${FAILED_JOB}" \
|
|
127
|
-
--arg run_url "${RUN_URL}" \
|
|
128
|
-
--arg repository "${{ github.repository }}" \
|
|
129
|
-
--arg commit "${{ github.sha }}" \
|
|
130
|
-
--arg commit_message "${COMMIT_MESSAGE}" \
|
|
131
|
-
--arg triggered_by "${{ github.actor }}" \
|
|
132
|
-
--arg environment "${ENVIRONMENT}" \
|
|
133
|
-
--arg ref "${{ github.ref }}" \
|
|
134
|
-
--arg run_id "${{ github.run_id }}" \
|
|
135
|
-
'{
|
|
136
|
-
"message": $message,
|
|
137
|
-
"level": $level,
|
|
138
|
-
"timestamp": $timestamp,
|
|
139
|
-
"platform": "other",
|
|
140
|
-
"sdk": {
|
|
141
|
-
"name": "github-actions",
|
|
142
|
-
"version": "1.0.0"
|
|
143
|
-
},
|
|
144
|
-
"logger": "github-actions.ci",
|
|
145
|
-
"environment": $environment,
|
|
146
|
-
"tags": {
|
|
147
|
-
"workflow": $workflow_name,
|
|
148
|
-
"job": $failed_job,
|
|
149
|
-
"repository": $repository,
|
|
150
|
-
"triggered_by": $triggered_by,
|
|
151
|
-
"ref": $ref,
|
|
152
|
-
"source": "github-actions"
|
|
153
|
-
},
|
|
154
|
-
"extra": {
|
|
155
|
-
"workflow_run_url": $run_url,
|
|
156
|
-
"commit_sha": $commit,
|
|
157
|
-
"commit_message": $commit_message,
|
|
158
|
-
"run_id": $run_id,
|
|
159
|
-
"failure_type": "ci_cd_workflow"
|
|
160
|
-
},
|
|
161
|
-
"contexts": {
|
|
162
|
-
"runtime": {
|
|
163
|
-
"name": "github-actions",
|
|
164
|
-
"version": "latest"
|
|
165
|
-
},
|
|
166
|
-
"os": {
|
|
167
|
-
"name": "ubuntu-latest"
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
"fingerprint": ["github-actions", $workflow_name, $failed_job]
|
|
171
|
-
}')
|
|
172
|
-
|
|
173
|
-
# Debug: Print the payload to see what'\''s being sent (without sensitive data)
|
|
174
|
-
echo "Debug: Generated payload:"
|
|
175
|
-
echo "$PAYLOAD" | jq 'del(.extra.commit_message)' | head -20
|
|
176
|
-
|
|
177
|
-
# Debug: Print Sentry configuration
|
|
178
|
-
echo "Debug: SENTRY_ORG=${{ inputs.SENTRY_ORG }}"
|
|
179
|
-
echo "Debug: SENTRY_PROJECT=${{ inputs.SENTRY_PROJECT }}"
|
|
180
|
-
echo "Debug: API URL=https://sentry.io/api/0/projects/${{ inputs.SENTRY_ORG }}/${{ inputs.SENTRY_PROJECT }}/store/"
|
|
181
|
-
|
|
182
|
-
# First, let's get the DSN for this project
|
|
183
|
-
DSN_RESPONSE=$(curl -s -w "\n%{http_code}" \
|
|
184
|
-
-H "Authorization: Bearer ${{ secrets.SENTRY_AUTH_TOKEN }}" \
|
|
185
|
-
"https://sentry.io/api/0/projects/${{ inputs.SENTRY_ORG }}/${{ inputs.SENTRY_PROJECT }}/keys/")
|
|
186
|
-
|
|
187
|
-
DSN_STATUS=$(echo "$DSN_RESPONSE" | tail -n1)
|
|
188
|
-
DSN_BODY=$(echo "$DSN_RESPONSE" | head -n -1)
|
|
189
|
-
|
|
190
|
-
if [ "$DSN_STATUS" = "200" ]; then
|
|
191
|
-
# Extract the DSN from the first key
|
|
192
|
-
DSN=$(echo "$DSN_BODY" | jq -r '.[0].dsn.public // empty')
|
|
193
|
-
echo "Debug: Found DSN: ${DSN:0:50}..." # Show first 50 chars for security
|
|
194
|
-
|
|
195
|
-
# Parse DSN to get the project ID and key
|
|
196
|
-
if [[ $DSN =~ https://([^@]+)@([^/]+)/([0-9]+) ]]; then
|
|
197
|
-
SENTRY_KEY="${BASH_REMATCH[1]}"
|
|
198
|
-
SENTRY_HOST="${BASH_REMATCH[2]}"
|
|
199
|
-
PROJECT_ID="${BASH_REMATCH[3]}"
|
|
200
|
-
|
|
201
|
-
# Call Sentry API to create issue using the store endpoint with proper auth
|
|
202
|
-
RESPONSE=$(curl -s -w "\n%{http_code}" \
|
|
203
|
-
-H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=$SENTRY_KEY" \
|
|
204
|
-
-H "Content-Type: application/json" \
|
|
205
|
-
-X POST \
|
|
206
|
-
--data "${PAYLOAD}" \
|
|
207
|
-
"https://${SENTRY_HOST}/api/${PROJECT_ID}/store/")
|
|
208
|
-
else
|
|
209
|
-
echo "Error: Could not parse DSN"
|
|
210
|
-
exit 1
|
|
211
|
-
fi
|
|
212
|
-
else
|
|
213
|
-
echo "Error: Could not retrieve project DSN. Status: $DSN_STATUS"
|
|
214
|
-
echo "Response: $DSN_BODY"
|
|
215
|
-
exit 1
|
|
216
|
-
fi
|
|
217
|
-
|
|
218
|
-
# Extract HTTP status code from response
|
|
219
|
-
HTTP_STATUS=$(echo "$RESPONSE" | tail -n1)
|
|
220
|
-
RESPONSE_BODY=$(echo "$RESPONSE" | head -n -1)
|
|
221
|
-
|
|
222
|
-
echo "HTTP Status: $HTTP_STATUS"
|
|
223
|
-
|
|
224
|
-
if [ "$HTTP_STATUS" = "200" ] || [ "$HTTP_STATUS" = "201" ]; then
|
|
225
|
-
# Extract issue ID from response
|
|
226
|
-
ISSUE_ID=$(echo "$RESPONSE_BODY" | jq -r '.id // empty')
|
|
227
|
-
|
|
228
|
-
if [ -n "$ISSUE_ID" ] && [ "$ISSUE_ID" != "null" ]; then
|
|
229
|
-
echo "Successfully created Sentry issue: $ISSUE_ID"
|
|
230
|
-
echo "issue_id=$ISSUE_ID" >> $GITHUB_OUTPUT
|
|
231
|
-
echo "issue_url=https://sentry.io/organizations/${{ inputs.SENTRY_ORG }}/issues/?project=${{ inputs.SENTRY_PROJECT }}&query=$ISSUE_ID" >> $GITHUB_OUTPUT
|
|
232
|
-
else
|
|
233
|
-
echo "Issue created but no ID returned. Response:"
|
|
234
|
-
echo "$RESPONSE_BODY" | jq . || echo "$RESPONSE_BODY"
|
|
235
|
-
fi
|
|
236
|
-
else
|
|
237
|
-
echo "Failed to create Sentry issue. API response:"
|
|
238
|
-
echo "Status: $HTTP_STATUS"
|
|
239
|
-
echo "Body: $RESPONSE_BODY"
|
|
240
|
-
|
|
241
|
-
# Provide helpful error messages
|
|
242
|
-
if [ "$HTTP_STATUS" = "400" ]; then
|
|
243
|
-
echo "Error: Bad request. Please check the payload format."
|
|
244
|
-
elif [ "$HTTP_STATUS" = "401" ]; then
|
|
245
|
-
echo "Error: Authentication failed. Please check SENTRY_AUTH_TOKEN."
|
|
246
|
-
elif [ "$HTTP_STATUS" = "403" ]; then
|
|
247
|
-
echo "Error: Permission denied. Please check token permissions (needs project:write)."
|
|
248
|
-
elif [ "$HTTP_STATUS" = "404" ]; then
|
|
249
|
-
echo "Error: Project not found. Please check SENTRY_ORG and SENTRY_PROJECT."
|
|
250
|
-
elif [ "$HTTP_STATUS" = "429" ]; then
|
|
251
|
-
echo "Error: Rate limit exceeded. Please try again later."
|
|
252
|
-
fi
|
|
253
|
-
|
|
254
|
-
exit 1
|
|
255
|
-
fi
|
|
256
|
-
|
|
257
|
-
- name: 📢 Report Issue Creation
|
|
258
|
-
if: steps.create_sentry_issue.outputs.issue_id
|
|
259
|
-
run: |
|
|
260
|
-
cd "${{ inputs.working_directory || '.' }}"
|
|
261
|
-
echo "Created Sentry issue: ${{ steps.create_sentry_issue.outputs.issue_id }}"
|
|
262
|
-
echo "Issue URL: ${{ steps.create_sentry_issue.outputs.issue_url }}"
|
|
263
|
-
|
|
264
|
-
- name: 📢 Report Creation Attempt
|
|
265
|
-
if: steps.create_sentry_issue.conclusion == 'success' && !steps.create_sentry_issue.outputs.issue_id
|
|
266
|
-
run: |
|
|
267
|
-
cd "${{ inputs.working_directory || '.' }}"
|
|
268
|
-
echo "Sentry event was sent successfully, but issue ID was not returned."
|
|
269
|
-
echo "Check your Sentry dashboard: https://sentry.io/organizations/${{ inputs.SENTRY_ORG }}/issues/?project=${{ inputs.SENTRY_PROJECT }}"
|