Compare commits

...

29 Commits

Author SHA1 Message Date
Github Build Bot
4e9e9b595a Add automated changelog yaml from template for bot PR 2022-08-02 15:18:35 +00:00
Github Build Bot
07c05df7d4 Add automated changelog yaml from template for bot PR 2022-08-02 15:15:53 +00:00
Emily Rockman
8fcd76d579 Merge branch 'emmyoop-patch-1' of https://github.com/dbt-labs/dbt-core into emmyoop-patch-1 2022-08-02 10:14:46 -05:00
Emily Rockman
3d594f79ca add cl 2022-08-02 10:14:17 -05:00
Emily Rockman
9aedcfb06e Delete Fixes-20220801-141122.yaml 2022-08-02 10:05:39 -05:00
Emily Rockman
00ae7f02ba catchup 2022-08-02 09:51:25 -05:00
Emily Rockman
b6534926c0 rename file 2022-08-02 09:48:32 -05:00
Emily Rockman
5b97ca7699 remove token 2022-08-02 09:09:36 -05:00
Emily Rockman
ef59ac3f57 Merge branch 'main' of https://github.com/dbt-labs/dbt-core into er/ct-872-resusable-changie 2022-08-02 09:08:11 -05:00
Emily Rockman
81122e22fe remove dummy changelog 2022-08-02 09:07:52 -05:00
Emily Rockman
053c995944 add checkout 2022-08-01 14:55:19 -05:00
Emily Rockman
9cc4a72e5e change label env 2022-08-01 14:53:07 -05:00
Emily Rockman
72f3b3d8d0 brute force it 2022-08-01 14:50:43 -05:00
Emily Rockman
b86b59233b inherit secrets 2022-08-01 14:44:48 -05:00
Github Build Bot
e58de6fa75 Add automated changelog yaml from template for bot PR 2022-08-01 19:39:21 +00:00
Emily Rockman
a56cbe6e5c Delete Dependency-20220801-193810.yaml 2022-08-01 14:38:35 -05:00
Github Build Bot
17e27de313 Add automated changelog yaml from template for bot PR 2022-08-01 19:38:16 +00:00
Emily Rockman
d772c39a13 Merge branch 'er/ct-872-resusable-changie' of https://github.com/dbt-labs/dbt-core into emmyoop-patch-1 2022-08-01 14:27:05 -05:00
Emily Rockman
b25a55c4df specify GITHUB_TOKEN 2022-08-01 14:25:23 -05:00
Emily Rockman
6c5c0213e5 changelog 2022-08-01 14:11:39 -05:00
Emily Rockman
7106110eea Update CONTRIBUTING.md 2022-08-01 10:27:52 -05:00
Emily Rockman
c23482a2de send in comment/label 2022-07-27 15:22:19 -05:00
Emily Rockman
3bf9b99f92 inherit secrets 2022-07-27 14:38:41 -05:00
Emily Rockman
95642a13e1 move def 2022-07-27 14:35:25 -05:00
Emily Rockman
3f518dc5aa fix typo 2022-07-27 14:32:09 -05:00
Emily Rockman
d803b29a76 update to use workflow 2022-07-27 14:29:34 -05:00
Emily Rockman
51bccde0ab reimplemented changelog 2022-07-27 14:06:47 -05:00
Emily Rockman
3fa193d83b fix branch name 2022-07-27 13:55:46 -05:00
Emily Rockman
dad919041a convert to reusable action 2022-07-27 13:51:03 -05:00
7 changed files with 76 additions and 87 deletions

View File

@@ -0,0 +1,7 @@
kind: Breaking Changes
body: changelogs!
time: 2022-08-02T10:14:06.122483-05:00
custom:
Author: emmyoop
Issue: "123"
PR: "345"

View File

@@ -0,0 +1,8 @@
kind: Dependency
body: "DRAFT - ignore"
time: 2022-08-02T15:15:49.00000Z
custom:
Author: emmyoop
Issue: 4904
PR: 5588

View File

@@ -0,0 +1,8 @@
kind: Dependency
body: "DRAFT - ignore"
time: 2022-08-02T15:18:31.00000Z
custom:
Author: emmyoop
Issue: 4904
PR: 5588

20
.github/_README.md vendored
View File

@@ -143,19 +143,21 @@ Some triggers of note that we use:
- Print out all variables you will reference as the first step of a job. This allows for easier debugging. The first job should log all inputs. Subsequent jobs should reference outputs of other jobs, if present.
When possible, generate variables at the top of your workflow in a single place to reference later. This is not always strictly possible since you may generate a value to be used lated mid-workflow.
When possible, generate variables at the top of your workflow in a single place to reference later. This is not always strictly possible since you may generate a value to be used later mid-workflow.
Be sure to use quotes around these logs so special characters are not interpreted.
```yaml
job1:
- name: [DEBUG] Print Variables
- name: "[DEBUG] Print Variables"
run: |
echo "all variables defined as inputs"
echo The last commit sha in the release: ${{ inputs.sha }}
echo The release version number: ${{ inputs.version_number }}
echo The changelog_path: ${{ inputs.changelog_path }}
echo The build_script_path: ${{ inputs.build_script_path }}
echo The s3_bucket_name: ${{ inputs.s3_bucket_name }}
echo The package_test_command: ${{ inputs.package_test_command }}
echo "The last commit sha in the release: ${{ inputs.sha }}"
echo "The release version number: ${{ inputs.version_number }}"
echo "The changelog_path: ${{ inputs.changelog_path }}"
echo "The build_script_path: ${{ inputs.build_script_path }}"
echo "The s3_bucket_name: ${{ inputs.s3_bucket_name }}"
echo "The package_test_command: ${{ inputs.package_test_command }}"
# collect all the variables that need to be used in subsequent jobs
- name: Set Variables
@@ -167,7 +169,7 @@ Some triggers of note that we use:
job2:
needs: [job1]
- name: '[DEBUG] Print Variables'
- name: "[DEBUG] Print Variables"
run: |
echo "all variables defined in job1 > Set Variables > outputs"
echo "important_path: ${{ needs.job1.outputs.important_path }}"

View File

@@ -1,78 +0,0 @@
# **what?**
# Checks that a file has been committed under the /.changes directory
# as a new CHANGELOG entry. Cannot check for a specific filename as
# it is dynamically generated by change type and timestamp.
# This workflow should not require any secrets since it runs for PRs
# from forked repos.
# By default, secrets are not passed to workflows running from
# a forked repo.
# **why?**
# Ensure code change gets reflected in the CHANGELOG.
# **when?**
# This will run for all PRs going into main and *.latest. It will
# run when they are opened, reopened, when any label is added or removed
# and when new code is pushed to the branch. The action will then get
# skipped if the 'Skip Changelog' label is present is any of the labels.
name: Check Changelog Entry
on:
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
pull-requests: write
env:
changelog_comment: 'Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry).'
jobs:
changelog:
name: changelog
if: "!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')"
runs-on: ubuntu-latest
steps:
- name: Check if changelog file was added
# https://github.com/marketplace/actions/paths-changes-filter
# For each filter, it sets output variable named by the filter to the text:
# 'true' - if any of changed files matches any of filter rules
# 'false' - if none of changed files matches any of filter rules
# also, returns:
# `changes` - JSON array with names of all filters matching any of the changed files
uses: dorny/paths-filter@v2
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: |
changelog:
- added: '.changes/unreleased/**.yaml'
- name: Check if comment already exists
uses: peter-evans/find-comment@v1
id: changelog_comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: ${{ env.changelog_comment }}
- name: Create PR comment if changelog entry is missing, required, and does not exist
if: |
steps.filter.outputs.changelog == 'false' &&
steps.changelog_comment.outputs.comment-body == ''
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: ${{ env.changelog_comment }}
- name: Fail job if changelog entry is missing and required
if: steps.filter.outputs.changelog == 'false'
uses: actions/github-script@v6
with:
script: core.setFailed('Changelog entry required to merge.')

View File

@@ -0,0 +1,40 @@
# **what?**
# Checks that a file has been committed under the /.changes directory
# as a new CHANGELOG entry. Cannot check for a specific filename as
# it is dynamically generated by change type and timestamp.
# This workflow should not require any secrets since it runs for PRs
# from forked repos.
# By default, secrets are not passed to workflows running from
# a forked repo.
# **why?**
# Ensure code change gets reflected in the CHANGELOG.
# **when?**
# This will run for all PRs going into main and *.latest. It will
# run when they are opened, reopened, when any label is added or removed
# and when new code is pushed to the branch. The action will then get
# skipped if the 'Skip Changelog' label is present is any of the labels.
name: Check Changelog Entry
on:
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
pull-requests: write
jobs:
changelog:
uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@er/changelog-check
with:
changelog_comment: 'Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry).'
skip_label: 'Skip Changelog'
secrets: inherit

View File

@@ -191,3 +191,5 @@ A `dbt-core` maintainer will review your PR. They may suggest code revision for
Automated tests run via GitHub Actions. If you're a first-time contributor, all tests (including code checks and unit tests) will require a maintainer to approve. Changes in the `dbt-core` repository trigger integration tests against Postgres. dbt Labs also provides CI environments in which to test changes to other adapters, triggered by PRs in those adapters' repositories, as well as periodic maintenance checks of each adapter in concert with the latest `dbt-core` code changes.
Once all tests are passing and your PR has been approved, a `dbt-core` maintainer will merge your changes into the active development branch. And that's it! Happy developing :tada:
change that doesn't matter