Skip to content

CI: fix missing slash command input args #37564

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

Merged
merged 6 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
6 changes: 6 additions & 0 deletions .github/workflows/connector-performance-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ on:
required: false
type: string
default: "true"

workflow_dispatch:
inputs:
connector:
Expand Down Expand Up @@ -83,6 +84,11 @@ on:
description: "Whether to report the performance test results to Datadog."
required: false
default: "false"
pr:
description: "PR Number (Unused)"
type: number
required: false

jobs:
uuid:
name: "Custom UUID of workflow run"
Expand Down
44 changes: 29 additions & 15 deletions .github/workflows/format-fix-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@ on:
inputs:
pr:
description: "Pull request number. Used to pull the proper branch ref, including on forks."
type: number
required: false
comment-id:
description: "Optional. The comment-id of the slash command. Used to update the comment with the status."
required: false

# These must be declared, but they are unused and ignored.
# TODO: Get 'repo' and 'gitref' from the PR on other workflows, so we can remove these.
repo:
description: "Repo (Ignored)"
required: false
default: "airbytehq/airbyte"
gitref:
description: "Ref (Ignored)"
required: false

run-name: "Fix formatting on PR #${{ github.event.inputs.pr }}"
concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.pr }}
Expand All @@ -21,30 +32,32 @@ jobs:
name: "Run airbyte-ci format fix all"
runs-on: ubuntu-latest
steps:
- name: Checkout Airbyte
uses: actions/checkout@v3
with:
# Important that this is set so that CI checks are triggered again
# Without this we would be forever waiting on required checks to pass
token: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}
fetch-depth: 1

- name: Checkout PR (${{ github.event.inputs.pr }})
uses: dawidd6/action-checkout-pr@v1
with:
pr: ${{ github.event.inputs.pr }}

- name: Get job variables
id: job-vars
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.inputs.pr }})
echo "::set-output name=repo::$(echo "$PR_JSON" | jq -r .head.repo.full_name)"
echo "::set-output name=branch::$(echo "$PR_JSON" | jq -r .head.ref)"
echo "repo=$(echo "$PR_JSON" | jq -r .head.repo.full_name)" >> $GITHUB_OUTPUT
echo "branch=$(echo "$PR_JSON" | jq -r .head.ref)" >> $GITHUB_OUTPUT
echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT

- name: Checkout Airbyte
uses: actions/checkout@v3
with:
repository: ${{ steps.job-vars.outputs.repo }}
ref: ${{ steps.job-vars.outputs.branch }}
fetch-depth: 1
# Important that token is a PAT so that CI checks are triggered again.
# Without this we would be forever waiting on required checks to pass.
token: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}

# - name: Checkout PR (${{ github.event.inputs.pr }})
# uses: dawidd6/action-checkout-pr@v1
# with:
# pr: ${{ github.event.inputs.pr }}

- name: Append comment with job run link
# If not comment-id is provided, this will create a new
# comment with the job run link.
Expand Down Expand Up @@ -82,6 +95,7 @@ jobs:
# Don't commit if we're on master
if: github.ref != 'refs/heads/master'
with:
repository: ${{ steps.job-vars.outputs.repo }}
commit_message: "chore: format code"
commit_user_name: Octavia Squidington III
commit_user_email: [email protected]
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish-java-cdk-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ on:
comment-id:
description: "Optional comment-id of the slash command. Ignore if not applicable."
required: false
pr:
description: "PR Number (ignored)"
type: number
required: false

concurrency:
group: publish-java-cdk
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ on:
local_cdk:
description: "Run Connector Acceptance Tests against the CDK version on the current branch."
required: false

# TODO: Replace 'gitref' and 'repo' inputs with 'pr'.
# See example in `.github/workflows/format-fix-command.yml`.
pr:
description: "PR Number (ignored)"
type: number
required: false

jobs:
write-deprecation-message:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-performance-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ on:
memorylimit:
description: "Memory CPU limit"
required: false
pr:
description: "PR Number (Unused)"
type: number
required: false

jobs:
start-test-runner:
Expand Down
Loading