Skip to content

Commit

Permalink
Move the ask-reviews job to a dedicated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chouetz committed Jan 2, 2025
1 parent a8ab65c commit 3b43189
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 21 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ask-reviews.yml
Original file line number Diff line number Diff line change
@@ -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 }}

21 changes: 0 additions & 21 deletions .github/workflows/label-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 3b43189

Please sign in to comment.