Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dq 470 add deprecation callout #145

Draft
wants to merge 8 commits into
base: fix-curl-downstream-asset
Choose a base branch
from
18 changes: 15 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17945,19 +17945,26 @@ ${downstreamAssets.hasMore ? `[See more downstream assets at Atlan](${create_com
// Generating the "View asset in Atlan" button
const viewAssetButton = `${getImageURL("atlan-logo", 15, 15)} [View asset in Atlan](${create_comment_ATLAN_INSTANCE_URL}/assets/${asset.guid}/overview?utm_source=dbt_github_action)`;

// Deprecation callout
const deprecationCallout = `:warning: Deprecation Notice: This action is scheduled for deprecation and will no longer be supported after June 2025. To ensure a smooth transition and continued functionality, please migrate to atlan-action by following the migration guide available [here](https://ask.atlan.com/hc/en-us/articles/11121331752719).`

// Generating the final comment based on the presence of downstream assets
if (downstreamAssets.entities.length > 0) {
return `${assetInfo}

${downstreamTable}

${viewAssetButton}`;
${viewAssetButton}

${deprecationCallout}`;
} else {
return `${assetInfo}

No downstream assets found.

${viewAssetButton}`;
${viewAssetButton}

${deprecationCallout}`;
}
}

Expand All @@ -17980,8 +17987,13 @@ async function checkCommentExists(octokit, context) {
async function createIssueComment(octokit, context, content, comment_id = null, forceNewComment = false) {
const {pull_request} = context.payload;

// Deprecation callout
const deprecationCallout = `:warning: Deprecation Notice: This action is scheduled for deprecation and will no longer be supported after June 2025. To ensure a smooth transition and continued functionality, please migrate to atlan-action by following the migration guide available [here](https://ask.atlan.com/hc/en-us/articles/11121331752719).`

content = `<!-- ActionCommentIdentifier: atlan-dbt-action -->
${content}`
${content}

${deprecationCallout}`

const commentObj = {
...context.repo,
Expand Down
18 changes: 15 additions & 3 deletions src/utils/create-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,26 @@ ${downstreamAssets.hasMore ? `[See more downstream assets at Atlan](${ATLAN_INST
// Generating the "View asset in Atlan" button
const viewAssetButton = `${getImageURL("atlan-logo", 15, 15)} [View asset in Atlan](${ATLAN_INSTANCE_URL}/assets/${asset.guid}/overview?utm_source=dbt_github_action)`;

// Deprecation callout
const deprecationCallout = `:warning: Deprecation Notice: This action is scheduled for deprecation and will no longer be supported after June 2025. To ensure a smooth transition and continued functionality, please migrate to atlan-action by following the migration guide available [here](https://ask.atlan.com/hc/en-us/articles/11121331752719).`

// Generating the final comment based on the presence of downstream assets
if (downstreamAssets.entities.length > 0) {
return `${assetInfo}

${downstreamTable}

${viewAssetButton}`;
${viewAssetButton}

${deprecationCallout}`;
} else {
return `${assetInfo}

No downstream assets found.

${viewAssetButton}`;
${viewAssetButton}

${deprecationCallout}`;
}
}

Expand All @@ -154,8 +161,13 @@ export async function checkCommentExists(octokit, context) {
export async function createIssueComment(octokit, context, content, comment_id = null, forceNewComment = false) {
const {pull_request} = context.payload;

// Deprecation callout
const deprecationCallout = `:warning: Deprecation Notice: This action is scheduled for deprecation and will no longer be supported after June 2025. To ensure a smooth transition and continued functionality, please migrate to atlan-action by following the migration guide available [here](https://ask.atlan.com/hc/en-us/articles/11121331752719).`

content = `<!-- ActionCommentIdentifier: atlan-dbt-action -->
${content}`
${content}

${deprecationCallout}`

const commentObj = {
...context.repo,
Expand Down
Loading