@@ -106,6 +106,21 @@ jobs:
106
106
" op://Product ACT/axiom_supplychain/ECOMMERCE_ECOMMERCE_MONGODB_MONGODB_DATABASE_URI"
107
107
SUPPLYCHAIN_SCMS_POSTGRES_JDBC_URL : " op://Product ACT/axiom_supplychain/SCMS_SCMS_POSTGRES_JDBC_URL"
108
108
SUPPLYCHAIN_SCMS_POSTGRES_JDBC_SCHEMAS : " op://Product ACT/axiom_supplychain/SCMS_SCMS_POSTGRES_JDBC_SCHEMAS"
109
+ # Telco secrets
110
+ TELCO_HASURA_DDN_PAT : " op://Product ACT/axiom_telco/ddn-service-account"
111
+ TELCO_JWT_SECRET : " op://Product ACT/axiom_telco/JWT_SECRET"
112
+ TELCO_AUTH_AUTH_JDBC_URL : " op://Product ACT/axiom_telco/AUTH_AUTH_JDBC_URL"
113
+ TELCO_AUTH_SEARCH_BRAVE_API_KEY : " op://Product ACT/axiom_telco/AUTH_SEARCH_BRAVE_API_KEY"
114
+ TELCO_AUTH_SEARCH_GEMINI_API_KEY : " op://Product ACT/axiom_telco/AUTH_SEARCH_GEMINI_API_KEY"
115
+ TELCO_AUTH_SEARCH_PERPLEXITY_API_KEY : " op://Product ACT/axiom_telco/AUTH_SEARCH_PERPLEXITY_API_KEY"
116
+ TELCO_CUSTOMER_AURORA_JDBC_URL : " op://Product ACT/axiom_telco/CUSTOMER_AURORA_JDBC_URL"
117
+ TELCO_CUSTOMER_MONGO_MONGODB_DATABASE_URI : " op://Product ACT/axiom_telco/CUSTOMER_MONGO_MONGODB_DATABASE_URI"
118
+ TELCO_NETWORK_CLICKHOUSE_JDBC_URL : " op://Product ACT/axiom_telco/NETWORK_CLICKHOUSE_JDBC_URL"
119
+ TELCO_NETWORK_KAFKA_SINK_JDBC_URL : " op://Product ACT/axiom_telco/NETWORK_KAFKA_SINK_JDBC_URL"
120
+ TELCO_SUPPORT_ATLAS_MONGODB_DATABASE_URI : " op://Product ACT/axiom_telco/SUPPORT_ATLAS_MONGODB_DATABASE_URI"
121
+ TELCO_SUPPORT_VECTOR_JDBC_URL : " op://Product ACT/axiom_telco/SUPPORT_VECTOR_JDBC_URL"
122
+ TELCO_SUPPORT_VECTOR_SEARCH_SERVICE_OPENAI_API_KEY :
123
+ " op://Product ACT/axiom_telco/SUPPORT_VECTOR_SEARCH_SERVICE_OPENAI_API_KEY"
109
124
110
125
- name : Build all changed demos
111
126
id : build
@@ -156,6 +171,21 @@ jobs:
156
171
export SCMS_SCMS_POSTGRES_JDBC_URL="$SUPPLYCHAIN_SCMS_POSTGRES_JDBC_URL"
157
172
export SCMS_SCMS_POSTGRES_JDBC_SCHEMAS="$SUPPLYCHAIN_SCMS_POSTGRES_JDBC_SCHEMAS"
158
173
;;
174
+ telco)
175
+ export HASURA_DDN_PAT="$TELCO_HASURA_DDN_PAT"
176
+ export JWT_SECRET="$TELCO_JWT_SECRET"
177
+ export AUTH_AUTH_JDBC_URL="$TELCO_AUTH_AUTH_JDBC_URL"
178
+ export AUTH_SEARCH_BRAVE_API_KEY="$TELCO_AUTH_SEARCH_BRAVE_API_KEY"
179
+ export AUTH_SEARCH_GEMINI_API_KEY="$TELCO_AUTH_SEARCH_GEMINI_API_KEY"
180
+ export AUTH_SEARCH_PERPLEXITY_API_KEY="$TELCO_AUTH_SEARCH_PERPLEXITY_API_KEY"
181
+ export CUSTOMER_AURORA_JDBC_URL="$TELCO_CUSTOMER_AURORA_JDBC_URL"
182
+ export CUSTOMER_MONGO_MONGODB_DATABASE_URI="$TELCO_CUSTOMER_MONGO_MONGODB_DATABASE_URI"
183
+ export NETWORK_CLICKHOUSE_JDBC_URL="$TELCO_NETWORK_CLICKHOUSE_JDBC_URL"
184
+ export NETWORK_KAFKA_SINK_JDBC_URL="$TELCO_NETWORK_KAFKA_SINK_JDBC_URL"
185
+ export SUPPORT_ATLAS_MONGODB_DATABASE_URI="$TELCO_SUPPORT_ATLAS_MONGODB_DATABASE_URI"
186
+ export SUPPORT_VECTOR_JDBC_URL="$TELCO_SUPPORT_VECTOR_JDBC_URL"
187
+ export SUPPORT_VECTOR_SEARCH_SERVICE_OPENAI_API_KEY="$TELCO_SUPPORT_VECTOR_SEARCH_SERVICE_OPENAI_API_KEY"
188
+ ;;
159
189
*)
160
190
echo "Unknown demo: $demo - skipping"
161
191
continue
@@ -210,6 +240,22 @@ jobs:
210
240
ECOMMERCE_ECOMMERCE_MONGODB_MONGODB_DATABASE_URI=$ECOMMERCE_ECOMMERCE_MONGODB_MONGODB_DATABASE_URI
211
241
SCMS_SCMS_POSTGRES_JDBC_URL=$SCMS_SCMS_POSTGRES_JDBC_URL
212
242
SCMS_SCMS_POSTGRES_JDBC_SCHEMAS=$SCMS_SCMS_POSTGRES_JDBC_SCHEMAS
243
+ EOF
244
+ ;;
245
+ telco)
246
+ cat > .env.cloud << EOF
247
+ JWT_SECRET=$JWT_SECRET
248
+ AUTH_AUTH_JDBC_URL=$AUTH_AUTH_JDBC_URL
249
+ AUTH_SEARCH_BRAVE_API_KEY=$AUTH_SEARCH_BRAVE_API_KEY
250
+ AUTH_SEARCH_GEMINI_API_KEY=$AUTH_SEARCH_GEMINI_API_KEY
251
+ AUTH_SEARCH_PERPLEXITY_API_KEY=$AUTH_SEARCH_PERPLEXITY_API_KEY
252
+ CUSTOMER_AURORA_JDBC_URL=$CUSTOMER_AURORA_JDBC_URL
253
+ CUSTOMER_MONGO_MONGODB_DATABASE_URI=$CUSTOMER_MONGO_MONGODB_DATABASE_URI
254
+ NETWORK_CLICKHOUSE_JDBC_URL=$NETWORK_CLICKHOUSE_JDBC_URL
255
+ NETWORK_KAFKA_SINK_JDBC_URL=$NETWORK_KAFKA_SINK_JDBC_URL
256
+ SUPPORT_ATLAS_MONGODB_DATABASE_URI=$SUPPORT_ATLAS_MONGODB_DATABASE_URI
257
+ SUPPORT_VECTOR_JDBC_URL=$SUPPORT_VECTOR_JDBC_URL
258
+ SUPPORT_VECTOR_SEARCH_SERVICE_OPENAI_API_KEY=$SUPPORT_VECTOR_SEARCH_SERVICE_OPENAI_API_KEY
213
259
EOF
214
260
;;
215
261
esac
@@ -234,8 +280,9 @@ jobs:
234
280
with :
235
281
script : |
236
282
const builds = JSON.parse(`${{ steps.build.outputs.builds_output }}`);
283
+ const commitSha = context.payload.pull_request.head.sha.substring(0, 7);
237
284
238
- let comment = `## 🚀 PromptQL Builds Complete\n\n`;
285
+ let comment = `## 🚀 PromptQL Builds Complete (${commitSha}) \n\n`;
239
286
240
287
builds.forEach(build => {
241
288
comment += `### ${build.demo.toUpperCase()} Demo\n`;
@@ -248,32 +295,14 @@ jobs:
248
295
comment += `\n`;
249
296
});
250
297
251
- const comments = await github.rest.issues.listComments({
298
+ // Always create a new comment
299
+ await github.rest.issues.createComment({
252
300
issue_number: context.issue.number,
253
301
owner: context.repo.owner,
254
302
repo: context.repo.repo,
303
+ body: comment
255
304
});
256
305
257
- const existingComment = comments.data.find(comment =>
258
- comment.body.includes('🚀 PromptQL Builds Complete')
259
- );
260
-
261
- if (existingComment) {
262
- await github.rest.issues.updateComment({
263
- comment_id: existingComment.id,
264
- owner: context.repo.owner,
265
- repo: context.repo.repo,
266
- body: comment
267
- });
268
- } else {
269
- await github.rest.issues.createComment({
270
- issue_number: context.issue.number,
271
- owner: context.repo.owner,
272
- repo: context.repo.repo,
273
- body: comment
274
- });
275
- }
276
-
277
306
- name : Notify Slack
278
307
if : always()
279
308
uses : actions/github-script@v7
@@ -283,13 +312,10 @@ jobs:
283
312
with :
284
313
script : |
285
314
const builds = JSON.parse(`${{ steps.build.outputs.builds_output }}`);
286
-
287
- console.log('Environment check:');
288
- console.log('SLACK_BOT_TOKEN exists:', !!process.env.SLACK_BOT_TOKEN);
289
- console.log('SLACK_CHANNEL_ID:', process.env.SLACK_CHANNEL_ID);
315
+ const commitSha = context.payload.pull_request.head.sha.substring(0, 7);
290
316
291
317
// Create message for each build
292
- let slackMessage = `🚀 *PromptQL Builds Complete*\n\n`;
318
+ let slackMessage = `🚀 *PromptQL Builds Complete* (${commitSha}) \n\n`;
293
319
294
320
builds.forEach(build => {
295
321
slackMessage += `*${build.demo.toUpperCase()} Demo*\n`;
@@ -302,7 +328,7 @@ jobs:
302
328
slackMessage += `\n`;
303
329
});
304
330
305
- // Check if thread exists in PR metadata
331
+ // Find existing PR thread
306
332
const comments = await github.rest.issues.listComments({
307
333
issue_number: context.issue.number,
308
334
owner: context.repo.owner,
@@ -317,11 +343,10 @@ jobs:
317
343
if (threadComment) {
318
344
const match = threadComment.body.match(/<!-- slack-thread-ts:([^-]+) -->/);
319
345
threadTs = match ? match[1] : null;
320
- console.log('Found existing thread:', threadTs);
321
346
}
322
347
348
+ // Create PR thread if it doesn't exist
323
349
if (!threadTs) {
324
- console.log('Creating new Slack thread...');
325
350
const prAuthor = context.payload.pull_request.user.login;
326
351
const prTitle = context.payload.pull_request.title;
327
352
const prNumber = context.payload.pull_request.number;
@@ -341,28 +366,22 @@ jobs:
341
366
});
342
367
343
368
const slackData = await response.json();
344
- console.log('Slack thread response:', JSON.stringify(slackData, null, 2));
345
-
346
- if (!slackData.ok) {
347
- console.error('Failed to create Slack thread:', slackData.error);
348
- return;
369
+ if (slackData.ok) {
370
+ threadTs = slackData.ts;
371
+
372
+ // Store thread timestamp
373
+ await github.rest.issues.createComment({
374
+ issue_number: context.issue.number,
375
+ owner: context.repo.owner,
376
+ repo: context.repo.repo,
377
+ body: `<!-- slack-thread-ts:${threadTs} -->`
378
+ });
349
379
}
350
-
351
- threadTs = slackData.ts;
352
-
353
- // Store thread timestamp in PR comment
354
- await github.rest.issues.createComment({
355
- issue_number: context.issue.number,
356
- owner: context.repo.owner,
357
- repo: context.repo.repo,
358
- body: `<!-- slack-thread-ts:${threadTs} -->`
359
- });
360
380
}
361
381
362
- // Only post to thread if we have a valid threadTs
382
+ // Post build info as reply in thread
363
383
if (threadTs) {
364
- console.log('Posting build info to thread:', threadTs);
365
- const buildResponse = await fetch('https://slack.com/api/chat.postMessage', {
384
+ await fetch('https://slack.com/api/chat.postMessage', {
366
385
method: 'POST',
367
386
headers: {
368
387
'Authorization': `Bearer ${process.env.SLACK_BOT_TOKEN}`,
@@ -374,13 +393,4 @@ jobs:
374
393
text: slackMessage,
375
394
}),
376
395
});
377
-
378
- const buildData = await buildResponse.json();
379
- console.log('Slack build response:', JSON.stringify(buildData, null, 2));
380
-
381
- if (!buildData.ok) {
382
- console.error('Failed to post build info:', buildData.error);
383
- }
384
- } else {
385
- console.error('No valid thread timestamp available');
386
396
}
0 commit comments