Skip to content

Commit

Permalink
changie - convert changelogs to yaml files and make quality of life i…
Browse files Browse the repository at this point in the history
…mprovements (#4917)

* convert changelog to changie yaml files

* update contributor format and README instructions

* update action to rerun when labeled/unlabled

* remove synchronize from action

* remove md file replaced by the yaml

* add synchronize and comment of what's happening

* tweak formatting
  • Loading branch information
emmyoop authored Mar 22, 2022
1 parent a968aa7 commit 55b1d3a
Show file tree
Hide file tree
Showing 23 changed files with 149 additions and 40 deletions.
33 changes: 0 additions & 33 deletions .changes/1.0.99.md

This file was deleted.

13 changes: 13 additions & 0 deletions .changes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ changie batch <version> --move-dir '<version>' --prerelease 'rc1'
changie merge
```

Example
```
changie batch 1.0.5 --move-dir '1.0.5' --prerelease 'rc1'
changie merge
```

#### Final Release Workflow
These commands batch up changes in `/.changes/unreleased` as well as `/.changes/<version>` to be included in this final release and delete all prereleases. This rolls all prereleases up into a single final release. All `yaml` files in `/unreleased` and `<version>` will be deleted at this point.

Expand All @@ -34,7 +40,14 @@ changie batch <version> --include '<version>' --remove-prereleases
changie merge
```

Example
```
changie batch 1.0.5 --include '1.0.5' --remove-prereleases
changie merge
```

### A Note on Manual Edits & Gotchas
- Changie generates markdown files in the `.changes` directory that are parsed together with the `changie merge` command. Every time `changie merge` is run, it regenerates the entire file. For this reason, any changes made directly to `CHANGELOG.md` will be overwritten on the next run of `changie merge`.
- If changes need to be made to the `CHANGELOG.md`, make the changes to the relevant `<version>.md` file located in the `/.changes` directory. You will then run `changie merge` to regenerate the `CHANGELOG.MD`.
- Do not run `changie batch` again on released versions. Our final release workflow deletes all of the yaml files associated with individual changes. If for some reason modifications to the `CHANGELOG.md` are required after we've generated the final release `CHANGELOG.md`, the modifications need to be done manually to the `<version>.md` file in the `/.changes` directory.
- changie can modify, create and delete files depending on the command you run. This is expected. Be sure to commit everything that has been modified and deleted.
7 changes: 7 additions & 0 deletions .changes/unreleased/Features-20220321-135949.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Features
body: Added Support for Semantic Versioning
time: 2022-03-21T13:59:49.725046-05:00
custom:
Author: alswang18
Issue: "4453"
PR: "4644"
8 changes: 8 additions & 0 deletions .changes/unreleased/Features-20220321-140046.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
kind: Features
body: New Dockerfile to support specific db adapters and platforms. See docker/README.md
for details
time: 2022-03-21T14:00:46.670045-05:00
custom:
Author: iknox-fa
Issue: "4495"
PR: "4487"
7 changes: 7 additions & 0 deletions .changes/unreleased/Features-20220321-140139.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Features
body: Allow unique_key to take a list
time: 2022-03-21T14:01:39.918897-05:00
custom:
Author: gshank
Issue: "2479"
PR: "4618"
7 changes: 7 additions & 0 deletions .changes/unreleased/Features-20220321-140306.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Features
body: "Add `--quiet` global flag and `print` Jinja function"
time: 2022-03-21T14:03:06.565157-05:00
custom:
Author: ehmartens
Issue: "3451"
PR: "4701"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20220321-140521.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: "User wasn't asked for permission to overwite a profile entry when running init inside an existing project"
time: 2022-03-21T14:05:21.238521-05:00
custom:
Author: NiallRees
Issue: "4375"
PR: "4447"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20220321-140720.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Add project name validation to `dbt init`
time: 2022-03-21T14:07:20.153071-05:00
custom:
Author: amirkdv
Issue: "4490"
PR: "4536"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20220321-140833.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Allow override of string and numeric types for adapters.
time: 2022-03-21T14:08:33.384372-05:00
custom:
Author: mdesmet
Issue: "4603"
PR: "4604"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20220321-140921.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: A change in secret environment variables won't trigger a full reparse
time: 2022-03-21T14:09:21.004543-05:00
custom:
Author: nathaniel-may
Issue: "4650"
PR: "4665"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20220321-141007.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Fix misspellings and typos in docstrings
time: 2022-03-21T14:10:07.962502-05:00
custom:
Author: kazanzhy
Issue: "4904"
PR: "4545"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220321-141158.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Testing cleanup
time: 2022-03-21T14:11:58.750419-05:00
custom:
Author: emmyoop
Issue: "3648"
PR: "4509"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220321-141300.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Clean up test deprecation warnings
time: 2022-03-21T14:13:00.557425-05:00
custom:
Author: gshank
Issue: "3988"
PR: "4556"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220321-141338.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Use mashumaro for serialization in event logging
time: 2022-03-21T14:13:38.758158-05:00
custom:
Author: gshank
Issue: "4504"
PR: "4505"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220321-141451.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Drop support for Python 3.7.0 + 3.7.1
time: 2022-03-21T14:14:51.840637-05:00
custom:
Author: nathaniel-may
Issue: "4584"
PR: "4585"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220321-141523.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Drop support for Python <3.7.2
time: 2022-03-21T14:15:23.893773-05:00
custom:
Author: jtcohen6
Issue: "4584"
PR: "4643"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220321-141610.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Re-format codebase (except tests) using pre-commit hooks
time: 2022-03-21T14:16:10.285506-05:00
custom:
Author: iknox-fa
Issue: "3195"
PR: "4697"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220321-141707.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Add deps module README
time: 2022-03-21T14:17:07.884314-05:00
custom:
Author: emmyoop
Issue: "4904"
PR: "4686"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220321-141747.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Initial conversion of tests to pytest
time: 2022-03-21T14:17:47.852378-05:00
custom:
Author: gshank
Issue: "4690"
PR: "4691"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220321-142055.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Fix errors in Windows for tests/functions
time: 2022-03-21T14:20:55.648765-05:00
custom:
Author: gshank
Issue: "4782"
PR: "4767"
2 changes: 1 addition & 1 deletion .changie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ footerFormat: |
{{- end}}
{{- end }}
{{- range $k,$v := $contributorDict }}
- [{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}[#{{$element}}](https://github.com/dbt-labs/dbt-core/pull/{{$element}}){{end}})
- [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}[#{{$element}}](https://github.com/dbt-labs/dbt-core/pull/{{$element}}){{end}})
{{- end }}
12 changes: 7 additions & 5 deletions .github/workflows/changelog-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
# Ensure code change gets reflected in the CHANGELOG.

# **when?**
# This will run for all PRs going into main and *.latest.
# 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:
Expand All @@ -33,6 +37,7 @@ env:
jobs:
changelog:
name: changelog
if: "!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')"

runs-on: ubuntu-latest

Expand Down Expand Up @@ -61,16 +66,13 @@ jobs:
- name: Create PR comment if changelog entry is missing, required, and does nto exist
if: |
steps.filter.outputs.changelog == 'false' &&
!contains( github.event.pull_request.labels.*.name, 'Skip Changelog') &&
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' &&
!contains( github.event.pull_request.labels.*.name, 'Skip Changelog')
if: steps.filter.outputs.changelog == 'false'
uses: actions/github-script@v6
with:
script: core.setFailed('Changelog entry required to merge.')
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). 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)


*** below changes will need to be manually merged with the changes generated by `changie batch` for 1.1.0. Once the two are merged, this file should be deleted. This is a one time thing because changie was introduced mid-development. ***
*** below changes will automatically be updated & replaced with the changes generated by `changie batch`/`changie merge` for 1.1.0. ***

## dbt-core 1.1.0 (TBD)

Expand Down

0 comments on commit 55b1d3a

Please sign in to comment.