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-384 rename(repo): change dbt-action to atlan-action #133

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Atlan dbt Action
# Atlan Action

![atlan<>dbt](https://user-images.githubusercontent.com/14099191/209542321-54d5557e-8abf-4d9a-9f6d-dcacb856f25f.png)

## Overview

_Have you ever changed a dbt model only to later find it broke a downstream table or dashboard? 💔_
_Have you ever changed a dbt model or a data contract only to later find it broke a downstream table or dashboard? 💔_
rittikdasgupta marked this conversation as resolved.
Show resolved Hide resolved

We've created a GitHub Action to help you out — putting Atlan's impact analysis right into your pull request. So now, before merging the PR, you can see the potential downstream impact of your changes.

Expand All @@ -31,7 +31,7 @@ Here's what it looks like 👇
2. Add the following code to the workflow file:

```yaml
name: Atlan dbt action
name: Atlan action

on:
pull_request:
Expand All @@ -43,7 +43,7 @@ Here's what it looks like 👇
runs-on: ubuntu-latest
steps:
- name: Run Action
uses: atlanhq/dbt-action@v1
uses: atlanhq/atlan-action@v2
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
ATLAN_INSTANCE_URL: ${{secrets.ATLAN_INSTANCE_URL}}
Expand All @@ -52,7 +52,7 @@ Here's what it looks like 👇

## Test the action

After you've completed the configuration above, create a pull request with a changed dbt model file to test the action. You should see the Atlan GitHub action running and then adding comments in your pull request:
After you've completed the configuration above, create a pull request with a changed dbt model or data contract file to test the action. You should see the Atlan GitHub action running and then adding comments in your pull request:

- The GitHub workflow will add and update a single comment for every file change.
- The impacted assets in the comment will be displayed in a collapsible section and grouped by source and asset type.
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run Action
uses: atlanhq/dbt-action@v1
uses: atlanhq/atlan-action@v2
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
ATLAN_INSTANCE_URL: ${{secrets.ATLAN_INSTANCE_URL}}
Expand All @@ -105,7 +105,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run Action
uses: atlanhq/dbt-action@v1
uses: atlanhq/atlan-action@v2
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
ATLAN_INSTANCE_URL: ${{secrets.ATLAN_INSTANCE_URL}}
Expand Down
4 changes: 2 additions & 2 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ It is a very useful and easy to use library, which runs your Github Actions loca

Since you as a developer would be using your Github PAT to test the action locally, you'll need to locally run the clone of your fork, in order to generate the event.json file, follow the following steps:

- [Fork this repo.](https://github.com/atlanhq/dbt-action/fork)
- [Fork this repo.](https://github.com/atlanhq/atlan-action/fork)
- Create a pull request from `test-action` branch to `main` branch. Once you do so, it will automatically run the action.
- Go to your forked repo's `Actions` page and open the workflow with the name `Test Action`.
- Click on the one and only job, `Get Downstream Assets`.
Expand All @@ -58,4 +58,4 @@ Once and if `act` is setup properly, then you can simply use the command `npm st

## Contributing

Please make sure to use the command `npm run sync` in order to sync changes, since the workflow [`.github/workflows/package-action.yml`](https://github.com/atlanhq/dbt-action/blob/main/.github/workflows/package-action.yml) updates the `dist/` in order to package the action code in case you forget to package the action before pushing.
Please make sure to use the command `npm run sync` in order to sync changes, since the workflow [`.github/workflows/package-action.yml`](https://github.com/atlanhq/atlan-action/blob/main/.github/workflows/package-action.yml) updates the `dist/` in order to package the action code in case you forget to package the action before pushing.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Atlan dbt Action"
description: "Whenever you make a change to a dbt model, Atlan will add downstream lineage impact context right in your pull requests."
name: "Atlan Action"
description: "Whenever you make a change to a dbt model or a data contract, Atlan will add downstream lineage impact context right in your pull requests."
author: "Atlan"

inputs:
Expand Down
4 changes: 2 additions & 2 deletions adapters/templates/github-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function getErrorResponseStatus401 (ATLAN_INSTANCE_URL, context) {

Atlan Instance URL: ${ATLAN_INSTANCE_URL}

Set your repository action secrets [here](https://github.com/${context.payload.repository.full_name}/settings/secrets/actions). For more information on how to setup the Atlan dbt Action, please read the [setup documentation here](https://github.com/atlanhq/dbt-action/blob/main/README.md).`
Set your repository action secrets [here](https://github.com/${context.payload.repository.full_name}/settings/secrets/actions). For more information on how to setup the Atlan Action, please read the [setup documentation here](https://github.com/atlanhq/atlan-action/blob/main/README.md).`
}

export function getErrorResponseStatusUndefined(ATLAN_INSTANCE_URL, context) {
Expand All @@ -16,7 +16,7 @@ Atlan Instance URL: ${ATLAN_INSTANCE_URL}
Make sure your Atlan Instance URL is set in the following format.
\`https://tenant.atlan.com\`

Set your repository action secrets [here](https://github.com/${context.payload.repository.full_name}/settings/secrets/actions). For more information on how to setup the Atlan dbt Action, please read the [setup documentation here](https://github.com/atlanhq/dbt-action/blob/main/README.md).`
Set your repository action secrets [here](https://github.com/${context.payload.repository.full_name}/settings/secrets/actions). For more information on how to setup the Atlan Action, please read the [setup documentation here](https://github.com/atlanhq/atlan-action/blob/main/README.md).`
}

export function getSetResourceOnAssetComment(tableMd, setResourceFailed) {
Expand Down
6 changes: 3 additions & 3 deletions adapters/templates/gitlab-integration.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { getImageURL, getConnectorImage, getCertificationImage } from "../utils/index.js";
import { getCertificationImage, getConnectorImage, getImageURL } from "../utils/index.js";

export function getErrorResponseStatus401 (ATLAN_INSTANCE_URL, CI_PROJECT_NAME, CI_PROJECT_NAMESPACE) {
return `We couldn't connect to your Atlan Instance, please make sure to set the valid Atlan Bearer Token as \`ATLAN_API_TOKEN\` as this repository's CI/CD variable.

Atlan Instance URL: ${ATLAN_INSTANCE_URL}

Set your CI/CD variables [here](https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/settings/ci_cd). For more information on how to setup the Atlan dbt Action, please read the [setup documentation here](https://ask.atlan.com/hc/en-us/articles/8284983222415).`
Set your CI/CD variables [here](https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/settings/ci_cd). For more information on how to setup the Atlan Action, please read the [setup documentation here](https://ask.atlan.com/hc/en-us/articles/8284983222415).`
}

export function getErrorResponseStatusUndefined(ATLAN_INSTANCE_URL, CI_PROJECT_NAME, CI_PROJECT_NAMESPACE) {
Expand All @@ -16,7 +16,7 @@ Atlan Instance URL: ${ATLAN_INSTANCE_URL}
Make sure your Atlan Instance URL is set in the following format.
\`https://tenant.atlan.com\`

Set your CI/CD variables [here](https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/settings/ci_cd). For more information on how to setup the Atlan dbt Action, please read the [setup documentation here](https://ask.atlan.com/hc/en-us/articles/8284983222415).`
Set your CI/CD variables [here](https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/settings/ci_cd). For more information on how to setup the Atlan Action, please read the [setup documentation here](https://ask.atlan.com/hc/en-us/articles/8284983222415).`
}

export function getSetResourceOnAssetComment(tableMd, setResourceFailed) {
Expand Down
17 changes: 13 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24831,7 +24831,7 @@ function getErrorResponseStatus401 (ATLAN_INSTANCE_URL, context) {

Atlan Instance URL: ${ATLAN_INSTANCE_URL}

Set your repository action secrets [here](https://github.com/${context.payload.repository.full_name}/settings/secrets/actions). For more information on how to setup the Atlan dbt Action, please read the [setup documentation here](https://github.com/atlanhq/dbt-action/blob/main/README.md).`
Set your repository action secrets [here](https://github.com/${context.payload.repository.full_name}/settings/secrets/actions). For more information on how to setup the Atlan Action, please read the [setup documentation here](https://github.com/atlanhq/atlan-action/blob/main/README.md).`
}

function getErrorResponseStatusUndefined(ATLAN_INSTANCE_URL, context) {
Expand All @@ -24842,7 +24842,7 @@ Atlan Instance URL: ${ATLAN_INSTANCE_URL}
Make sure your Atlan Instance URL is set in the following format.
\`https://tenant.atlan.com\`

Set your repository action secrets [here](https://github.com/${context.payload.repository.full_name}/settings/secrets/actions). For more information on how to setup the Atlan dbt Action, please read the [setup documentation here](https://github.com/atlanhq/dbt-action/blob/main/README.md).`
Set your repository action secrets [here](https://github.com/${context.payload.repository.full_name}/settings/secrets/actions). For more information on how to setup the Atlan Action, please read the [setup documentation here](https://github.com/atlanhq/atlan-action/blob/main/README.md).`
}

function getSetResourceOnAssetComment(tableMd, setResourceFailed) {
Expand Down Expand Up @@ -25120,6 +25120,15 @@ async function getContractAsset({
term: {
qualifiedName: assetQualifiedName
}
},
{
terms: {
"__typeName.keyword": [
"Table",
"MaterialisedView",
"View"
]
}
}
]
}
Expand Down Expand Up @@ -39056,7 +39065,7 @@ function gitlab_integration_getErrorResponseStatus401 (ATLAN_INSTANCE_URL, CI_PR

Atlan Instance URL: ${ATLAN_INSTANCE_URL}

Set your CI/CD variables [here](https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/settings/ci_cd). For more information on how to setup the Atlan dbt Action, please read the [setup documentation here](https://ask.atlan.com/hc/en-us/articles/8284983222415).`
Set your CI/CD variables [here](https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/settings/ci_cd). For more information on how to setup the Atlan Action, please read the [setup documentation here](https://ask.atlan.com/hc/en-us/articles/8284983222415).`
}

function gitlab_integration_getErrorResponseStatusUndefined(ATLAN_INSTANCE_URL, CI_PROJECT_NAME, CI_PROJECT_NAMESPACE) {
Expand All @@ -39067,7 +39076,7 @@ Atlan Instance URL: ${ATLAN_INSTANCE_URL}
Make sure your Atlan Instance URL is set in the following format.
\`https://tenant.atlan.com\`

Set your CI/CD variables [here](https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/settings/ci_cd). For more information on how to setup the Atlan dbt Action, please read the [setup documentation here](https://ask.atlan.com/hc/en-us/articles/8284983222415).`
Set your CI/CD variables [here](https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/settings/ci_cd). For more information on how to setup the Atlan Action, please read the [setup documentation here](https://ask.atlan.com/hc/en-us/articles/8284983222415).`
}

function gitlab_integration_getSetResourceOnAssetComment(tableMd, setResourceFailed) {
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "@atlanhq/dbt-action",
"name": "@atlanhq/atlan-action",
"version": "1.0.0",
"description": "Get all the downstream assets that get affected when dbt model sql files are changed on pull request conversations.",
"description": "Get all the downstream assets that get affected when dbt model or data contract sql files are changed on pull request conversations.",
"main": "dist/index.js",
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/atlanhq/dbt-action.git"
"url": "git+https://github.com/atlanhq/atlan-action.git"
},
"keywords": [
"github",
"actions",
"atlan",
"atlanhq",
"dbt-action"
"dbt-action",
"atlan-action"
],
"scripts": {
"build": "ncc build adapters/index.js -o dist",
Expand All @@ -23,9 +24,9 @@
"author": "Jaagrav Seal <[email protected]> (https://atlan.com/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/atlanhq/dbt-action/issues"
"url": "https://github.com/atlanhq/atlan-action/issues"
},
"homepage": "https://github.com/atlanhq/dbt-action#readme",
"homepage": "https://github.com/atlanhq/atlan-action#readme",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
Expand All @@ -43,4 +44,4 @@
"devDependencies": {
"@types/json-stringify-safe": "^5.0.2"
}
}
}