Skip to content

Commit

Permalink
[DOP-4876]: Add deprecation warning message to Autobuilder staging bu…
Browse files Browse the repository at this point in the history
…ilds (#1067)
  • Loading branch information
branberry authored Aug 6, 2024
1 parent 4d25f38 commit 98dbde7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/controllers/v2/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ function prepProgressMessage(
status: string,
errorReason: string
): string {
const msg = `Your Job (<${jobUrl}${jobId}|${jobTitle}>) `;
const env = c.get<string>('env');
const deprecationWarning =
env === 'prd'
? 'The Autobuilder for staging will be deprecated by Sept. 30th. Please reach out to #ask-docs-platform on questions on how to migrate to Netlify for staging builds.'
: '';
const msg = `Your Job (<${jobUrl}${jobId}|${jobTitle}>) `;
switch (status) {
case 'inQueue':
return msg + 'has successfully been added to the ' + env + ' queue.';
return msg + `has successfully been added to the ${env} queue. ${deprecationWarning}`;
case 'inProgress':
return msg + 'is now being processed.';
case 'completed':
Expand Down

0 comments on commit 98dbde7

Please sign in to comment.