-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
54 lines (49 loc) · 2 KB
/
action.yml
File metadata and controls
54 lines (49 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Elementary Data Quality Review
description: >
Queries the Elementary API for data quality context on changed dbt models
and posts a summary comment to the GitHub Pull Request.
author: Elementary Data
branding:
icon: shield
color: blue
inputs:
elementary-api-key:
description: Elementary Cloud API key
required: true
elementary-api-url:
description: Elementary API base URL (defaults to production)
required: false
default: "https://prod.api.elementary-data.com"
elementary-env-id:
description: >
Elementary environment ID (UUID). Required when the repository is
connected to more than one Elementary environment. Found in the
Elementary Cloud URL, e.g. https://app.elementary-data.com/<env-id>/…
required: false
outputs:
review-status:
description: >
Whether the review completed successfully.
"success" if the review ran.
value: ${{ steps.review.outputs.status }}
runs:
using: composite
steps:
- name: Run Elementary review
id: review
shell: bash
env:
ELEMENTARY_API_KEY: ${{ inputs.elementary-api-key }}
ELEMENTARY_API_URL: ${{ inputs.elementary-api-url }}
ELEMENTARY_ENV_ID: ${{ inputs.elementary-env-id }}
REPOSITORY: ${{ github.repository }}
BRANCH: ${{ github.head_ref }}
run: |
export COMMENT_MARKER="<!-- elementary-data-quality-code-review -->"
export POST_COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
export LIST_COMMENTS_URL="https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
export UPDATE_COMMENT_URL_TPL="https://api.github.com/repos/${{ github.repository }}/issues/comments/{id}"
export AUTH_HEADER_NAME="Authorization"
export AUTH_HEADER_VALUE="Bearer ${{ github.token }}"
bash "${{ github.action_path }}/scripts/review.sh"
echo "status=success" >> $GITHUB_OUTPUT