Skip to content

Commit

Permalink
chore: Update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed May 12, 2023
1 parent 12c5a95 commit ed079a5
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17834,8 +17834,6 @@ async function renderDownstreamAssetsComment(
downstreamAssets,
classifications
) {
console.log('Materialised asset', materialisedAsset)

let impactedData = downstreamAssets.map(
({displayText, guid, typeName, attributes, meanings, classificationNames}) => {
let readableTypeName = typeName
Expand All @@ -17854,7 +17852,7 @@ async function renderDownstreamAssetsComment(
classificationsObj?.map(({
name,
displayName
}) => `[${displayName}](${create_comment_ATLAN_INSTANCE_URL}/governance/classifications/${name}?utm_source=dbt_github_action)`)?.join(', ') || " ", attributes?.sourceURL || ""
}) => `\`${displayName}\``)?.join(', ') || " ", attributes?.sourceURL || ""
];
}
);
Expand Down Expand Up @@ -18002,14 +18000,15 @@ async function getChangedFiles(octokit, context) {
);

var changedFiles = res.data
.map(({filename}) => {
.map(({filename, status}) => {
try {
const [modelName] = filename.match(/.*models\/(.*)\.sql/)[1].split('/').reverse()[0].split('.');

if (modelName) {
return {
fileName: modelName,
filePath: filename,
status
};
}
} catch (e) {
Expand Down Expand Up @@ -18430,6 +18429,8 @@ async function createResource(guid, name, link) {
});
})

console.log("Created Resource:", response)

return response;
}

Expand Down Expand Up @@ -18507,13 +18508,20 @@ async function printDownstreamAssets({octokit, context}) {
let comments = ``;
let totalChangedFiles = 0;

for (const {fileName, filePath} of changedFiles) {
for (const {fileName, filePath, status} of changedFiles) {
const assetName = await getAssetName({octokit, context, fileName, filePath});
const asset = await getAsset({name: assetName});

if (totalChangedFiles !== 0)
comments += '\n\n---\n\n';

if (status === "added") {
comments += `### ${getConnectorImage('dbt')} <b>${fileName}</b> 🆕
Its a new model and not present in Atlan yet, you'll see the downstream impact for it after its present in Atlan.`
totalChangedFiles++
continue;
}

if (asset.error) {
comments += asset.error;
totalChangedFiles++
Expand Down

0 comments on commit ed079a5

Please sign in to comment.