Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: leahwicz/testRepo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.2
Choose a base ref
...
head repository: leahwicz/testRepo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 192 additions and 53 deletions.
  1. +27 −17 .github/workflows/basic.yml
  2. +7 −28 .github/workflows/main.yml
  3. +85 −0 .github/workflows/test-backport.yml
  4. +28 −4 .github/workflows/test-caller.yml
  5. +13 −0 README.md
  6. +0 −4 azure-pipelines.yml
  7. +32 −0 dbt-redshift-1.5.1.rb
44 changes: 27 additions & 17 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
# This is a basic workflow to help you get started with Actions

name: CI
name: Homebrew test

# Controls when the workflow will run
on:
workflow_call:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
homebrew:
runs-on: macos-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a set of commands using the runners shell
- name: Run a multi-line script
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Update homebrew and cleanup
run: |
brew update
brew update
brew cleanup
- name: Brew doctor
run: |
brew doctor
- name: Add resources to formula
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo ${{ github.event.label.name }}
echo ${{ github.event.issue.title }}
brew update-python-resources dbt-redshift-1.5.1.rb -d --package-name dbt-redshift
35 changes: 7 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -8,41 +8,20 @@
# **when?**
# On labels being added or removed from issues

name: Jira Label Mirroring
name: Test

on:
issues:
types: [labeled, unlabeled]
workflow_dispatch:
repository_dispatch:
types: [scheduled-release-branch]

permissions:
issues: read

jobs:
extract-id:
print-step:
runs-on: ubuntu-latest
if: startsWith(github.event.issue.title, '[CT-')
outputs:
issueId: ${{ steps.extract.outputs.issueId }}
steps:
- name: Extract issue from title
id: extract
env:
TITLE: "${{ github.event.issue.title }}"
- name: Print
run: |
ID=$(echo -n $TITLE | awk '{print $1}' | awk -F'[][]' '{print $2}')
echo ::set-output name=issueId::$ID
edit-label:
runs-on: ubuntu-latest
needs: extract-id
steps:
- name: Setup Jira
uses: atlassian/gajira-cli@v2.0.2

- name: Add label
if: github.event.action == 'labeled'
run: jira labels add ${{ needs.extract-id.outputs.issueId }} ${{ github.event.label.name }}

- name: Remove label
if: github.event.action == 'unlabeled'
run: jira labels remove ${{ needs.extract-id.outputs.issueId }} ${{ github.event.label.name }}
echo running on branch ${GITHUB_REF##*/}
85 changes: 85 additions & 0 deletions .github/workflows/test-backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# **what?**
# For issues that have been open for awhile without activity, label
# them as stale with a warning that they will be closed out. If
# anyone comments to keep the issue open, it will automatically
# remove the stale label and keep it open.

# Stale label rules:
# awaiting_response, more_information_needed -> 90 days
# good_first_issue, help_wanted -> 360 days (a year)
# tech_debt -> 720 (2 years)
# all else defaults -> 180 days (6 months)

# **why?**
# To keep the repo in a clean state from issues that aren't relevant anymore

# **when?**
# Triggered by the repos but usually on a schedule to run once a day

name: "Close stale issues and PRs"
on:
workflow_call:

permissions:
issues: write
pull-requests: write

env:
STALE_ISSUE_MSG: "This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days."
STALE_PR_MSG: "This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days."
CLOSE_ISSUE_MSG: "Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers."
CLOSE_PR_MSG: "Although we are closing this PR as stale, it can still be reopened to continue development. Just add a comment to notify the maintainers."
CLOSE_ISSUE_REASON: "not_planned"

jobs:
stale-awaiting-response:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
stale-issue-message: ${{ env.STALE_ISSUE_MSG }}
stale-pr-message: ${{ env.STALE_PR_MSG }}
close-issue-message: ${{ env.CLOSE_ISSUE_MSG }}
close-pr-message: ${{ env.CLOSE_PR_MSG }}
close-issue-reason: ${{ env.CLOSE_ISSUE_REASON }}
days-before-stale: 90
any-of-labels: ['awaiting_response', 'more_information_needed']

stale-first-issue:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
stale-issue-message: ${{ env.STALE_ISSUE_MSG }}
stale-pr-message: ${{ env.STALE_PR_MSG }}
close-issue-message: ${{ env.CLOSE_ISSUE_MSG }}
close-pr-message: ${{ env.CLOSE_PR_MSG }}
close-issue-reason: ${{ env.CLOSE_ISSUE_REASON }}
days-before-stale: 360
any-of-labels: ['good_first_issue', 'help_wanted']

stale-tech-debt:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
stale-issue-message: ${{ env.STALE_ISSUE_MSG }}
stale-pr-message: ${{ env.STALE_PR_MSG }}
close-issue-message: ${{ env.CLOSE_ISSUE_MSG }}
close-pr-message: ${{ env.CLOSE_PR_MSG }}
close-issue-reason: ${{ env.CLOSE_ISSUE_REASON }}
days-before-stale: 720
any-of-labels: 'tech_debt'

stale-default:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
stale-issue-message: ${{ env.STALE_ISSUE_MSG }}
stale-pr-message: ${{ env.STALE_PR_MSG }}
close-issue-message: ${{ env.CLOSE_ISSUE_MSG }}
close-pr-message: ${{ env.CLOSE_PR_MSG }}
close-issue-reason: ${{ env.CLOSE_ISSUE_REASON }}
days-before-stale: 180
exempt-issue-labels: ['tech_debt', 'good_first_issue', 'help_wanted']
32 changes: 28 additions & 4 deletions .github/workflows/test-caller.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
name: Call a reusable workflow and use its outputs

on:
issues:
types: [labeled, unlabeled]
workflow_dispatch:

permissions: read-all

jobs:
job1:
uses: leahwicz/testRepo/.github/workflows/basic.yml@master
dispatch:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
branch: [master, testBranch]
steps:

- name: Call CI workflow for ${{ matrix.branch }} branch
id: trigger-step
uses: aurelien-baudet/workflow-dispatch@v2.1.1
with:
workflow: main.yml
ref: ${{ matrix.branch }}
token: ${{ secrets.PAT_TOKEN }}

- name: Another step that can handle the result
if: always()
run: |
echo "Another Workflow conclusion: ${{ steps.trigger-step.outputs.workflow-conclusion }}"
- name: Another step that can handle the result
if: ${{ always() && !contains(steps.trigger-step.outputs.workflow-conclusion,'success') }}
run: |
echo "Another Workflow conclusion: ${{ steps.trigger-step.outputs.workflow-conclusion }}"
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,3 +2,16 @@

test12345678
test
test
test
test
test
test
test
test
test
test
test
test
test
test
4 changes: 0 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- master
32 changes: 32 additions & 0 deletions dbt-redshift-1.5.1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Documentation: https://docs.brew.sh/Formula-Cookbook
# https://rubydoc.brew.sh/Formula
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class DbtRedshift151 < Formula
include Language::Python::Virtualenv

desc ""
homepage ""
url "https://github.com/dbt-labs/dbt-redshift/releases/download/v1.5.1/dbt-redshift-1.5.1.tar.gz"
sha256 "380bc617a4c547fce09f8535e4428e0208fa1cd6a4787ac5de01f206efb6a461"
license ""

depends_on "python"

def install
# ENV.deparallelize # if your formula fails when building in parallel
virtualenv_install_with_resources
end

test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! For Homebrew/homebrew-core
# this will need to be a test that verifies the functionality of the
# software. Run the test with `brew test dbt-redshift-1.5.1`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "false"
end
end