Skip to content

Commit

Permalink
update for changie testing
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed May 5, 2023
1 parent a6a8b4c commit 05c53b7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
49 changes: 29 additions & 20 deletions .changie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,38 @@ changesDir: .changes
unreleasedDir: unreleased
headerPath: header.tpl.md
versionHeaderPath: ""
versionFooterPath: ""
changelogPath: CHANGELOG.md
versionExt: md
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
versionFormat: '## changie_bot {{.Version}} - {{.Time.Format "January 02, 2006"}}'
kindFormat: '### {{.Kind}}'
changeFormat: '* {{.Body}}'
headerFormat: ""
footerFormat: ""
changeFormat: '- {{.Body}} ([#{{.Custom.Issue}}](https://github.com/emmyoop/changie_bot/issues/{{.Custom.Issue}}), [#{{.Custom.PR}}](https://github.com/emmyoop/changie_bot/pull/{{.Custom.PR}}))'

kinds:
- label: Added
- label: Changed
- label: Deprecated
- label: Removed
- label: Fixed
- label: Security
- label: Breaking Changes
- label: Features
- label: Fixes
- label: Docs
changeFormat: '- {{.Body}} ([dbt-docs/#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-docs/issues/{{.Custom.Issue}}), [dbt-docs/#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-docs/pull/{{.Custom.PR}}))'
- label: Under the Hood
- label: Dependencies
changeFormat: '- {{.Body}} ({{if ne .Custom.Issue ""}}[#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), {{end}}[#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}}))'
- label: Security
changeFormat: '- {{.Body}} ({{if ne .Custom.Issue ""}}[#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), {{end}}[#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}}))'


newlines:
afterChangelogHeader: 1
afterKind: 1
afterChangelogVersion: 1
beforeKind: 1
endOfVersion: 1

custom:
- key: Field 1
label: String Field
- key: Author
label: GitHub Username(s) (separated by a single space if multiple)
type: string
- key: Field 2
label: Int Field
type: int
- key: Field 3
label: Enum Field
type: enum
enumOptions: ["a", "b"]
minLength: 3
- key: Issue
label: GitHub Issue Number
type: string
minInt: 3
11 changes: 9 additions & 2 deletions .github/workflows/changie_bot_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,22 @@ jobs:

steps:

- name: generate custom fields
id: custom
shell: bash
run: |
CUSTOM_FIELDS='{"Author": emmyoop, "Issue": 1234}'
echo "fields=$CUSTOM_FIELDS" >> $GITHUB_OUTPUT
- name: Create and commit changelog on bot PR
if: ${{ contains(github.event.pull_request.labels.*.name, matrix.label) }}
id: bot_changelog
uses: emmyoop/changie_bot@v1.0.1
uses: emmyoop/changie_bot@er/use-changie-cli
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
commit_author_name: "Github Build Bot"
commit_author_email: "<[email protected]>"
commit_message: "Add automated changelog yaml from template for bot PR"
changie_kind: ${{ matrix.changie_kind }}
label: ${{ matrix.label }}
custom_changelog_string: "custom:\n Author: ${{ github.event.pull_request.user.login }}\n Issue: \n PR: ${{ github.event.pull_request.number }}"
custom_changelog_json: ${{ steps.custom.outputs.fields }}

0 comments on commit 05c53b7

Please sign in to comment.