Skip to content

Commit f68f209

Browse files
Add disabling variables for issue_assignee, issue_label, label, and requested_reviewer_history (#64)
* working * tests * tweaks * docs * joe feedback * avinash feedback * switch source package dep
1 parent 26a75e7 commit f68f209

23 files changed

Lines changed: 713 additions & 109 deletions

.buildkite/scripts/run_models.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ cd integration_tests
1818
dbt deps
1919
dbt seed --target "$db" --full-refresh
2020
dbt source freshness --target "$db" || echo "...Only verifying freshness runs…"
21+
dbt run --vars '{github__using_repo_team: false, github__using_issue_assignee: false, github__using_issue_label: false, github__using_requested_reviewer_history: false, github__using_label: false}' --target "$db" --full-refresh
22+
dbt test --vars '{github__using_repo_team: false, github__using_issue_assignee: false, github__using_issue_label: false, github__using_requested_reviewer_history: false, github__using_label: false}' --target "$db"
2123
dbt run --target "$db" --full-refresh
2224
dbt test --target "$db"
23-
dbt run --vars '{github__using_repo_team: false}' --target "$db" --full-refresh
24-
dbt test --target "$db"
2525

2626
dbt run-operation fivetran_utils.drop_schemas_automation --target "$db"
Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1-
## PR Overview
2-
**This PR will address the following Issue/Feature:**
1+
<!--
2+
Pre-Submission Reminders
3+
Before marking this PR as "ready for review":
34
4-
**This PR will result in the following new package version:**
5-
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? -->
5+
- `dbt run --full-refresh && dbt test`
6+
- `dbt run` && `dbt test` (if incremental models are present)
7+
- The related issue is linked, tagged, and appropriately assigned
8+
- Documentation and version updates are included, if applicable
9+
- `docs` have been regenerated (unless there are no code or YAML changes)
10+
- BuildKite integration tests are passing
11+
-->
612

7-
**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:**
8-
<!--- Copy/paste the CHANGELOG for this version below. -->
13+
## PR Overview
14+
**Package version introduced in this PR:**
15+
16+
**This PR addresses the following Issue/Feature(s):**
17+
<!-- Add Issue # or internal ticket reference -->
918

10-
## PR Checklist
11-
### Basic Validation
12-
Please acknowledge that you have successfully performed the following commands locally:
13-
- [ ] dbt run –full-refresh && dbt test
14-
- [ ] dbt run (if incremental models are present) && dbt test
19+
**Summary of changes:**
20+
<!-- 1-2 sentences describing PR changes. -->
1521

16-
Before marking this PR as "ready for review" the following have been applied:
17-
- [ ] The appropriate issue has been linked, tagged, and properly assigned
18-
- [ ] All necessary documentation and version upgrades have been applied
19-
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)
20-
- [ ] BuildKite integration tests are passing
21-
- [ ] Detailed validation steps have been provided below
2222

23-
### Detailed Validation
24-
Please share any and all of your validation steps:
25-
<!--- Provide the steps you took to validate your changes below. -->
23+
### Submission Checklist
24+
- [ ] Alignment meeting with the reviewer (if needed)
25+
- [ ] Timeline and validation requirements discussed
26+
- [ ] Provide validation details:
27+
- [ ] **Validation Steps:** Check for unintentional effects (e.g., add/run consistency & integrity tests)
28+
- [ ] **Testing Instructions:** Confirm the change addresses the issue(s)
29+
- [ ] **Focus Areas:** Complex logic or queries that need extra attention
2630

27-
### If you had to summarize this PR in an emoji, which would it be?
28-
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
29-
:dancer:
31+
### Changelog
32+
<!-- Recommend drafting changelog notes, then refining via ChatGPT using:
33+
"Draft a changelog entry based on the following notes." -->
34+
- [ ] Draft changelog for PR
35+
- [ ] Final changelog for release review

.quickstart/quickstart.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ schema_key: github_schema
44
dbt_versions: ">=1.3.0 <2.0.0"
55

66
table_variables:
7+
github__using_issue_assignee:
8+
- issue_assignee
9+
github__using_issue_label:
10+
- issue_label
11+
github__using_label:
12+
- label
713
github__using_repo_team:
814
- repo_team
915
- team
16+
github__using_requested_reviewer_history:
17+
- requested_reviewer_history
1018

1119
destination_configurations:
1220
databricks:

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# dbt_github v0.9.1
2+
3+
[PR #64](https://github.com/fivetran/dbt_github/pull/64) includes the following updates:
4+
5+
## Feature Updates
6+
- Added the following variables to account for potentially missing tables. For dbt Core users, each is `True` by default and will need to be set to `False` in the root project's `dbt_project.yml`. For Fivetran Quickstart users, they will be dynamically enabled/disabled based on the presence of the associated source table.
7+
- `github__using_issue_assignee`: Disable if missing `ISSUE_ASSIGNEE`
8+
- `github__using_issue_label`: Disable if missing `ISSUE_LABEL`
9+
- `github__using_label`: Disable if missing `LABEL`
10+
- `github__using_requested_reviewer_history`: Disable if missing `REQUESTED_REVIEWER_HISTORY`
11+
12+
## Under the Hood
13+
- Updated package maintainer PR template.
14+
- Added new variables to the `quickstart.yml` file.
15+
- Added consistency validation tests for the `github__daily/weeky/monthly/quarterly_metrics` models.
16+
117
# dbt_github v0.9.0
218

319
[PR #63](https://github.com/fivetran/dbt_github/pull/63) includes the following updates:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright © 2025 Fivetran Inc.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<p align="center">
1+
# Github dbt Package ([Docs](https://fivetran.github.io/dbt_github/))
2+
3+
<p align="left">
24
<a alt="License"
35
href="https://github.com/fivetran/dbt_github/blob/main/LICENSE">
46
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" /></a>
@@ -13,7 +15,6 @@
1315
<img src="https://img.shields.io/badge/Fivetran_Quickstart_Compatible%3F-yes-green.svg" /></a>
1416
</p>
1517

16-
# Github dbt Package ([Docs](https://fivetran.github.io/dbt_github/))
1718
## What does this dbt package do?
1819

1920
- Produces modeled tables that leverage Github data from [Fivetran's connector](https://fivetran.com/docs/applications/github) in the format described by [this ERD](https://fivetran.com/docs/applications/github#schemainformation) and builds off of the output from our [github source package](https://github.com/fivetran/dbt_github_source).
@@ -80,14 +81,18 @@ vars:
8081
### Step 4: Disable models for non-existent sources
8182
Your Github connection might not sync every table that this package expects. If your syncs exclude certain tables, it is because you either don't use that functionality in Github or have actively excluded some tables from your syncs.
8283

83-
If you do not have the `REPO_TEAM` table synced, add the following variable to your `dbt_project.yml` file:
84+
If you do not have the `TEAM`, `REPO_TEAM`, `ISSUE_ASSIGNEE`, `ISSUE_LABEL`, `LABEL`, or `REQUESTED_REVIEWER_HISTORY` tables synced and are not running the package via Fivetran Quickstart, add the following variables to your `dbt_project.yml` file:
8485

8586
```yml
8687
vars:
87-
github__using_repo_team: false # by default this is assumed to be true
88+
github__using_repo_team: false # by default this is assumed to be true. Set to false if missing TEAM or REPO_TEAM
89+
github__using_issue_assignee: false # by default this is assumed to be true
90+
github__using_issue_label: false # by default this is assumed to be true
91+
github__using_label: false # by default this is assumed to be true
92+
github__using_requested_reviewer_history: false # by default this is assumed to be true
8893
```
8994

90-
*Note: This package only integrates the above variable. If you'd like to disable other models, please create an [issue](https://github.com/fivetran/dbt_github/issues) specifying which ones.*
95+
*Note: This package only integrates the above variables. If you'd like to disable other models, please create an [issue](https://github.com/fivetran/dbt_github/issues) specifying which ones.*
9196

9297
### (Optional) Step 5: Additional configurations
9398

dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config-version: 2
22
name: 'github'
3-
version: '0.9.0'
3+
version: '0.9.1'
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55
models:
66
github:

docs/catalog.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/index.html

Lines changed: 214 additions & 39 deletions
Large diffs are not rendered by default.

docs/manifest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)