Skip to content

Commit

Permalink
Merge pull request #39 from fivetran/release/v0.8.0
Browse files Browse the repository at this point in the history
Release/v0.8.0
  • Loading branch information
fivetran-catfritz authored Apr 2, 2024
2 parents 301b87f + ca44cc2 commit bc3dafb
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 59 deletions.
42 changes: 10 additions & 32 deletions .github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,26 @@
**This PR will result in the following new package version:**
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? -->

**Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:**
**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:**
<!--- Copy/paste the CHANGELOG for this version below. -->

## PR Checklist
### Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
- [ ] dbt compile
- [ ] dbt run –full-refresh
- [ ] dbt run
- [ ] dbt test
- [ ] dbt run –vars (if applicable)
- [ ] dbt run –full-refresh && dbt test
- [ ] dbt run (if incremental models are present) && dbt test

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

### Detailed Validation
Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":
- [ ] You have validated these changes and assure this PR will address the respective Issue/Feature.
- [ ] You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
- [ ] You have provided details below around the validation steps performed to gain confidence in these changes.
Please share any and all of your validation steps:
<!--- Provide the steps you took to validate your changes below. -->

### Standard Updates
Please acknowledge that your PR contains the following standard updates:
- Package versioning has been appropriately indexed in the following locations:
- [ ] indexed within dbt_project.yml
- [ ] indexed within integration_tests/dbt_project.yml
- [ ] CHANGELOG has individual entries for each respective change in this PR
<!--- If there is a parallel upstream change, remember to reference the corresponding CHANGELOG as an individual entry. -->
- [ ] README updates have been applied (if applicable)
<!--- Remember to check the following README locations for common updates. →
<!--- Suggested install range (needed for breaking changes) →
<!--- Dependency matrix is appropriately updated (if applicable) →
<!--- New variable documentation (if applicable) -->
- [ ] DECISIONLOG updates have been updated (if applicable)
- [ ] Appropriate yml documentation has been added (if applicable)

### dbt Docs
Please acknowledge that after the above were all completed the below were applied to your branch:
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)

### If you had to summarize this PR in an emoji, which would it be?
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
:dancer:
:dancer:
13 changes: 13 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'auto release'
on:
pull_request:
types:
- closed
branches:
- main

jobs:
call-workflow-passing-data:
if: github.event.pull_request.merged
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
secrets: inherit
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# dbt_github_source v0.8.0
[PR #39](https://github.com/fivetran/dbt_jira/dbt_github_source/39) contains the following updates:

## 🚨 Breaking Change 🚨
- For consistency with other Fivetran packages, added default target schemas in `dbt_project.yml`. This is a breaking change since the model outputs will now be stored in a schema called `<your target schema>_github_source` by default. You will need to update any of your downstream use cases to point to the new schema.
- Refer to [the Change the Build Schema section](https://github.com/fivetran/dbt_github_source/blob/main/README.md#change-the-build-schema) of the README for instructions on how to adjust the output schema.

## Feature updates
- Added field `created_at` to model `stg_github__issue_comment`.
- Updated the source freshness test enablement/disablement to leverage the dbt-core `config: enabled` architecture.

## Contributors
- [@rajan-lw](https://github.com/rajan-lw) ([PR #33](https://github.com/fivetran/dbt_github_source/pull/33))

# dbt_github_source v0.7.1

## Fixes
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Include the following github_source package version in your `packages.yml` file.
```yaml
packages:
- package: fivetran/github_source
version: [">=0.7.0", "<0.8.0"] # we recommend using ranges to capture non-breaking changes automatically
version: [">=0.8.0", "<0.9.0"] # we recommend using ranges to capture non-breaking changes automatically
```

## Step 3: Define database and schema variables
Expand All @@ -69,10 +69,10 @@ vars:
*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_source/issues) specifying which ones.*

## (Optional) Step 5: Additional configurations
<details><summary>Expand to view configurations</summary>
<details open><summary>Expand/collapse configurations</summary>

### Change the build schema
By default, this package builds the github staging models within a schema titled (`<target_schema>` + `_stg_github`) in your destination. If this is not where you would like your github staging data to be written to, add the following configuration to your root `dbt_project.yml` file:
By default, this package builds the github staging models within a schema titled (`<target_schema>` + `_github_source`) in your destination. If this is not where you would like your github staging data to be written, add the following configuration to your root `dbt_project.yml` file:

```yml
models:
Expand Down
7 changes: 4 additions & 3 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
config-version: 2
name: 'github_source'
version: '0.7.1'
version: '0.8.0'
require-dbt-version: [">=1.3.0", "<2.0.0"]
models:
github_source:
materialized: table
+materialized: table
+schema: github_source
tmp:
materialized: view
+materialized: view
vars:
github_source:
issue_assignee: "{{ source('github', 'issue_assignee') }}"
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'github_source_integration_tests'
version: '0.7.1'
version: '0.8.0'
config-version: 2
profile: 'integration_tests'
vars:
Expand Down
6 changes: 4 additions & 2 deletions models/src_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ sources:
description: Foreign key that references the issue table
- name: user_id
description: Foreign key that references the user table
- name: created_at
description: Timestamp of when the issue comment was created.

- name: issue_merged
loaded_at_field: _fivetran_synced
Expand Down Expand Up @@ -151,8 +153,8 @@ sources:
- name: repo_team
identifier: "{{ var('github_repo_team_identifier', 'repo_team')}}"
description: Table representing the mapping relationships between repositories and teams
meta:
is_enabled: "{{ var('github__using_repo_team', true) }}"
config:
enabled: "{{ var('github__using_repo_team', true) }}"
columns:
- name: repository_id
description: Reference to the respective repository for the record.
Expand Down
2 changes: 2 additions & 0 deletions models/stg_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ models:
description: Foreign key that references the issue table
- name: user_id
description: Foreign key that references the user table
- name: created_at
description: Timestamp of when the issue comment was created.

- name: stg_github__issue_merged
description: Table that tracks when an issue (always a pull request) is merged
Expand Down
7 changes: 4 additions & 3 deletions models/stg_github__issue_comment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ with issue_comment as (
), fields as (

select
id as issue_comment_id,
issue_id,
user_id
id as issue_comment_id,
issue_id,
user_id,
created_at

from macro
)
Expand Down

0 comments on commit bc3dafb

Please sign in to comment.