Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow for Approval Bot Dispatch #20376

Merged
merged 1 commit into from
Dec 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/approve-and-merge-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Approve and Merge Command Dispatch
on:
issue_comment:
types: [created]
jobs:
approveAndMergeDispatch:
runs-on: ubuntu-latest
steps:
- name: Checkout Airbyte
uses: actions/checkout@v3
- name: Check PAT rate limits
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.AIRBYTEIO_PAT }} \
${{ secrets.OCTAVIA_GITHUB_RUNNER_TOKEN }} \
${{ secrets.SUPERTOPHER_PAT }}

- name: Auto Approve Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@v3
id: scd
with:
token: ${{ env.PAT }}
permission: write
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@supertopher this should limit who can invoke the bot (need to have at least write permission on this repo)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack. ty

issue-type: pull-request
repository: airbytehq/airbyte-cloud
dispatch-type: repository
commands: |
approve-and-merge

- name: Edit comment with error message
if: steps.scd.outputs.error-message
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.comment.id }}
body: |
> Error: ${{ steps.scd.outputs.error-message }}