Skip to content

Commit

Permalink
draft commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Apr 20, 2024
1 parent 00ff2ae commit a1cf815
Show file tree
Hide file tree
Showing 41 changed files with 1,152 additions and 1,519 deletions.
35 changes: 0 additions & 35 deletions .bumpversion.cfg

This file was deleted.

38 changes: 38 additions & 0 deletions .github/actions/update-dev-branches/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Update dev branches"
description: "Update dev branches for testing cross-repo changes"

inputs:
dbt-adapters-branch:
description: "The branch/tag of `dbt-adapters` to use"
default: ""
dbt-common-branch:
description: "The branch/tag of `dbt-common` to use"
default: ""
dbt-core-branch:
description: "The branch/tag of `dbt-core` to use"
default: ""

runs:
using: composite
steps:
- name: "[DEBUG] Inputs"
shell: bash
run: |
echo dbt-adapters : ${{ inputs.dbt-adapters-branch }}
echo dbt-common : ${{ inputs.dbt-common-branch }}
echo dbt-core : ${{ inputs.dbt-core-branch }}
- name: "Update `dbt-adapters` branch"
if: ${{ inputs.dbt-adapters-branch }}
shell: bash
run: ./.github/actions/update-dev-branches/update_dev_branch.sh "dbt-adapters" ${{ inputs.dbt-adapters-branch }}

- name: "Update `dbt-common` branch"
if: ${{ inputs.dbt-common-branch }}
shell: bash
run: ./.github/actions/update-dev-branches/update_dev_branch.sh "dbt-common" ${{ inputs.dbt-common-branch }}

- name: "Update `dbt-core` branch"
if: ${{ inputs.dbt-core-branch }}
shell: bash
run: ./.github/actions/update-dev-branches/update_dev_branch.sh "dbt-core" ${{ inputs.dbt-core-branch }}
15 changes: 15 additions & 0 deletions .github/actions/update-dev-branches/update_dev_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e
set -e

package=$1
branch=$2

file="pyproject.toml"
sed_pattern="s|${package}.git@main*|${package}.git@${branch}|g"

# mac ships with a different version of sed that requires a delimiter arg
if [[ "$OSTYPE" == darwin* ]]; then
sed -i "" "$sed_pattern" $file
else
sed -i "$sed_pattern" $file
fi
9 changes: 5 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
version: 2

updates:
- package-ecosystem: "pip"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
interval: "daily"
rebase-strategy: "disabled"
- package-ecosystem: "github-actions"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "weekly"
rebase-strategy: "disabled"
87 changes: 0 additions & 87 deletions .github/scripts/integration-test-matrix.js

This file was deleted.

20 changes: 0 additions & 20 deletions .github/scripts/update_dbt_core_branch.sh

This file was deleted.

18 changes: 0 additions & 18 deletions .github/scripts/update_dependencies.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .github/scripts/update_release_branch.sh

This file was deleted.

38 changes: 18 additions & 20 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,32 @@
# Example: backport 1.0.latest
#
# You MUST "Squash and merge" the original PR or this won't work.

#
# **why?**
# Changes sometimes need to be backported to release branches.
# This automates the backporting process

#
# **when?**
# Once a PR is "Squash and merge"'d, by adding a backport label, this is triggered
name: "Backport"

name: Backport
on:
pull_request:
types:
- labeled
pull_request:
types:
- labeled

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

jobs:
backport:
name: Backport
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& contains(github.event.label.name, 'backport')
steps:
- uses: tibdex/backport@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
backport:
name: "Backport"
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
if: github.event.pull_request.merged && contains(github.event.label.name, 'backport')
steps:
- uses: tibdex/backport@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
59 changes: 27 additions & 32 deletions .github/workflows/bot-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,36 @@
#
# **how to add another bot?**
# Add the label and changie kind to the include matrix. That's it!
#

name: Bot Changelog
name: "Bot changelog"

on:
pull_request:
# catch when the PR is opened with the label or when the label is added
types: [opened, labeled]
pull_request:
# catch when the PR is opened with the label or when the label is added
types:
- opened
- labeled

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

jobs:
generate_changelog:
strategy:
matrix:
include:
- label: "dependencies"
changie_kind: "Dependencies"
- label: "snyk"
changie_kind: "Security"
runs-on: ubuntu-latest

steps:

- 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
with:
GITHUB_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
commit_author_name: "Github Build Bot"
commit_author_email: "<buildbot@fishtownanalytics.com>"
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 PR: ${{ github.event.pull_request.number }}"
generate_changelog:
strategy:
matrix:
include:
- label: "dependencies"
changie_kind: "Dependencies"
runs-on: ubuntu-latest
steps:
- name: "Create and commit a changie entry for an automated PR"
if: ${{ contains(github.event.pull_request.labels.*.name, matrix.label) }}
uses: emmyoop/changie_bot@v1
with:
GITHUB_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
commit_author_name: "Github Build Bot"
commit_author_email: "<buildbot@fishtownanalytics.com>"
commit_message: "[automated] changie entry"
changie_kind: ${{ matrix.changie_kind }}
label: ${{ matrix.label }}
custom_changelog_string: "custom:\n Author: ${{ github.event.pull_request.user.login }}\n PR: ${{ github.event.pull_request.number }}"
Loading

0 comments on commit a1cf815

Please sign in to comment.