Skip to content

Commit

Permalink
Revert "Cleans up label actions && fix broken action (#17324)" (#17329)
Browse files Browse the repository at this point in the history
This reverts commit dd95d3a.
  • Loading branch information
supertopher authored Sep 28, 2022
1 parent 0ace816 commit 83cdf19
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ jobs:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
pat: ${{ steps.variables.outputs.pat }}
steps:
- name: UUID ${{ github.event.inputs.uuid }}
run: true
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.OCTAVIA_4_ROOT_ACCESS }} \
${{ secrets.OCTAVIA_PAT }}
${{ secrets.OCTAVIA_PAT }} \
${{ secrets.OCTAVIA_4_ROOT_ACCESS }}
shared-issues:
name: "Add Labels to Issues. Safe to Merge on fail"
runs-on: ubuntu-latest
Expand All @@ -27,7 +31,7 @@ jobs:
with:
pal-repo-token: "${{ needs.find_valid_pat.outputs.pat }}"
pal-repo-name: airbytehq/workflow-actions@production
# the following input gets passed to the private
token: "${{ env.PAT }}"
# the following input gets passed to the private action
token: "${{ needs.find_valid_pat.outputs.pat }}"
# ref: https://github.com/airbytehq/workflow-actions/blob/main/src/bin_issue.ts
command: "issue"
32 changes: 0 additions & 32 deletions .github/workflows/label-prs-by-context.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# the mapping from filepath to label
# is defined in .github/label-github-issues-by-path.yml
# is defined in .github/labeler.yml

name: "Label PR based on filepath"
on:
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/notify-on-label.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
# Notify users/teams when labels are added to an issue.

name: Notify FE team for FE label on issues
name: Notify when adding label to issue

on:
issues:
types: [labeled]

jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.OCTAVIA_4_ROOT_ACCESS }} \
${{ secrets.OCTAVIA_PAT }}
notify:
name: "Notify FE team on label creation"
runs-on: ubuntu-latest
steps:
- uses: jenschelkopf/issue-label-notification-action@1.3
with:
token: "${{ env.PAT }}"
token: ${{ secrets.OCTAVIA_PAT }}
message: 'cc {recipients}'
# Specify a map of label -> team/user to notify
recipients: |
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/notify-on-push-to-master.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
name: Trigger action in cloud based on push
name: Notify Cloud of OSS Push to Master
on:
push:
branches:
- master
workflow_dispatch:

jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
pat: ${{ steps.variables.outputs.pat }}
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.OCTAVIA_4_ROOT_ACCESS }} \
${{ secrets.OCTAVIA_PAT }}
repo-sync:
name: "Fire a Repo Dispatch event to airbyte-cloud"
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ env.pat }}
token: ${{ secrets.OCTAVIA_PAT }}
repository: airbytehq/airbyte-cloud
event-type: oss-push-to-master
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
18 changes: 18 additions & 0 deletions .github/workflows/shared-pulls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Runs internal automation for pull requests

name: "Add metadata and labels to PRs based on context"
on:
pull_request_target:
types: [opened, labeled, unlabeled, ready_for_review, synchronize, reopened]

jobs:
shared-pulls:
runs-on: ubuntu-latest
steps:
- uses: nick-fields/private-action-loader@v3
with:
pal-repo-token: "${{ secrets.OCTAVIA_PAT }}"
pal-repo-name: airbytehq/workflow-actions@production
# the following input gets passed to the private action
token: "${{ secrets.OCTAVIA_PAT }}"
command: "pull"

0 comments on commit 83cdf19

Please sign in to comment.