Skip to content

Commit

Permalink
Adding YAML formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
leahwicz committed Aug 12, 2024
1 parent 5575fa8 commit e871e37
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 71 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/changelog-entry-check.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: Changelog entry check

on:
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize

defaults:
run:
shell: bash
run:
shell: bash

permissions:
contents: read
pull-requests: write
contents: read
pull-requests: write

jobs:
changelog-entry-check:
uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@main
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
[dbt-postgres contributing guide](https://github.com/dbt-labs/dbt-postgres/blob/main/CONTRIBUTING.md).
skip_label: "Skip Changelog"
secrets: inherit
changelog-entry-check:
uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@main
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
[dbt-postgres contributing guide](https://github.com/dbt-labs/dbt-postgres/blob/main/CONTRIBUTING.md).
skip_label: "Skip Changelog"
secrets: inherit
8 changes: 4 additions & 4 deletions .github/workflows/docs-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defaults:
shell: bash

permissions:
issues: write # comments on issues
issues: write # comments on issues

jobs:
open_issues:
Expand All @@ -35,7 +35,7 @@ jobs:
(github.event.action == 'labeled' && github.event.label.name == 'user docs'))
uses: dbt-labs/actions/.github/workflows/open-issue-in-repo.yml@main
with:
issue_repository: "dbt-labs/docs.getdbt.com"
issue_title: "Docs Changes Needed from ${{ github.event.repository.name }} Issue #${{ github.event.issue.number }}"
issue_body: "At a minimum, update body to include a link to the page on docs.getdbt.com requiring updates and what part(s) of the page you would like to see updated."
issue_repository: "dbt-labs/docs.getdbt.com"
issue_title: "Docs Changes Needed from ${{ github.event.repository.name }} Issue #${{ github.event.issue.number }}"
issue_body: "At a minimum, update body to include a link to the page on docs.getdbt.com requiring updates and what part(s) of the page you would like to see updated."
secrets: inherit
10 changes: 5 additions & 5 deletions .github/workflows/release_prep_hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ jobs:
runs-on: ubuntu-latest
needs: release-inputs
if: |
needs.release-inputs.outputs.changelog-exists == 'false' ||
needs.release-inputs.outputs.version-is-current == 'false'
needs.release-inputs.outputs.changelog-exists == 'false' ||
needs.release-inputs.outputs.version-is-current == 'false'
outputs:
name: ${{ steps.release-branch.outputs.name }}

Expand Down Expand Up @@ -404,9 +404,9 @@ jobs:
- release-branch
- release-inputs
if: |
!failure() && !cancelled() &&
needs.release-branch.result == 'success' &&
inputs.deploy-to == 'prod'
!failure() && !cancelled() &&
needs.release-branch.result == 'success' &&
inputs.deploy-to == 'prod'
steps:
- name: "Checkout ${{ github.event.repository.name }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ on:
workflow_dispatch:
inputs:
version_number:
description: 'The version number to bump to (ex. 1.2.0, 1.3.0b1)'
required: true
description: 'The version number to bump to (ex. 1.2.0, 1.3.0b1)'
required: true

jobs:
version_bump_and_changie:
Expand Down
86 changes: 46 additions & 40 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,57 @@ repos:
rev: v4.4.0
hooks:
- id: check-yaml
args: [--unsafe]
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict

- repo: https://github.com/dbt-labs/pre-commit-hooks
rev: v0.1.0a1
hooks:
- id: dbt-core-in-adapters-check
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2', --offset, '2', --preserve-quotes]
files: ^.github/workflows

- repo: https://github.com/dbt-labs/pre-commit-hooks
rev: v0.1.0a1
hooks:
- id: dbt-core-in-adapters-check

- repo: https://github.com/psf/black
rev: 24.4.0
hooks:
- id: black
args:
- --line-length=99
- --target-version=py38
- --target-version=py39
- --target-version=py310
- --target-version=py311
- --target-version=py312
- repo: https://github.com/psf/black
rev: 24.4.0
hooks:
- id: black
args:
- --line-length=99
- --target-version=py38
- --target-version=py39
- --target-version=py310
- --target-version=py311
- --target-version=py312

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
exclude: tests/
args:
- --max-line-length=99
- --select=E,F,W
- --ignore=E203,E501,E741,W503,W504
- --per-file-ignores=*/__init__.py:F401
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
exclude: tests/
args:
- --max-line-length=99
- --select=E,F,W
- --ignore=E203,E501,E741,W503,W504
- --per-file-ignores=*/__init__.py:F401

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
args:
- --explicit-package-bases
- --ignore-missing-imports
- --pretty
- --show-error-codes
files: ^dbt/adapters/postgres
additional_dependencies:
- types-PyYAML
- types-protobuf
- types-pytz
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
args:
- --explicit-package-bases
- --ignore-missing-imports
- --pretty
- --show-error-codes
files: ^dbt/adapters/postgres
additional_dependencies:
- types-PyYAML
- types-protobuf
- types-pytz

0 comments on commit e871e37

Please sign in to comment.