From 3b43189dc1c42683398e29e5b4c2eb425ab7ae69 Mon Sep 17 00:00:00 2001 From: Nicolas Schweitzer Date: Thu, 2 Jan 2025 15:54:00 +0100 Subject: [PATCH] Move the ask-reviews job to a dedicated workflow --- .github/workflows/ask-reviews.yml | 36 ++++++++++++++++++++++++++++ .github/workflows/label-analysis.yml | 21 ---------------- 2 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/ask-reviews.yml diff --git a/.github/workflows/ask-reviews.yml b/.github/workflows/ask-reviews.yml new file mode 100644 index 00000000000000..1074a1235c7c73 --- /dev/null +++ b/.github/workflows/ask-reviews.yml @@ -0,0 +1,36 @@ +--- + name: "Ask for reviews" + + on: + pull_request: + types: [labeled] + branches: + - main + - "[0-9]+.[0-9]+.x" + + permissions: {} + + jobs: + + ask-reviews: + if: github.triggering_actor != 'dd-devflow[bot]' + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + - name: Setup python + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + with: + python-version-file: .python-version + cache: 'pip' + cache-dependency-path: '**/requirements*.txt' + - name: Install dependencies + run: pip install -r requirements.txt -r tasks/requirements.txt --break-system-packages + - name: Ask for code reviews + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_API_TOKEN : ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }} + run: inv -e issue.ask-reviews -p ${{ github.event.pull_request.number }} + \ No newline at end of file diff --git a/.github/workflows/label-analysis.yml b/.github/workflows/label-analysis.yml index 34380a5eb218ed..8dc2c1cef6804c 100644 --- a/.github/workflows/label-analysis.yml +++ b/.github/workflows/label-analysis.yml @@ -138,24 +138,3 @@ jobs: run: pip install -r requirements.txt -r tasks/requirements.txt - name: Check agent telemetry metric list run: inv -e github.agenttelemetry-list-change-ack-check --pr-id=${{ github.event.pull_request.number }} - - ask-reviews: - if: github.triggering_actor != 'dd-devflow[bot]' && github.event.action != 'synchronize' - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - - name: Setup python - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 - with: - python-version-file: .python-version - cache: 'pip' - cache-dependency-path: '**/requirements*.txt' - - name: Install dependencies - run: pip install -r requirements.txt -r tasks/requirements.txt --break-system-packages - - name: Ask for code reviews - env: - SLACK_API_TOKEN : ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }} - run: inv -e issue.ask-reviews -p ${{ github.event.pull_request.number }}