Skip to content

Enable agentic reviewer workflows in drasi-server#93

Open
ruokun-niu wants to merge 1 commit intomainfrom
drasi-server-agentic-reviewer
Open

Enable agentic reviewer workflows in drasi-server#93
ruokun-niu wants to merge 1 commit intomainfrom
drasi-server-agentic-reviewer

Conversation

@ruokun-niu
Copy link
Copy Markdown
Collaborator

Description

Adds .github/workflows/pr-reviewers.yml, a label-driven caller workflow
that dispatches the centralized Drasi agentic PR reviewers hosted in
drasi-project/.github.

When a PR is labeled with one of:

  • review:correctness
  • review:security
  • review:design
  • review:docs
  • review:testing
  • review:prior-art
  • review:all (runs all six)

the workflow invokes the corresponding pr-*-reviewer.lock.yml in
drasi-project/.github via gh workflow run (cross-repo
workflow_dispatch). Each reviewer executes in the .github repo
context, fetches the PR, and posts its review back as a comment on
this PR.

For reference, here is a test PR: drasi-project/drasi-core#429

Type of change

  • This pull request fixes a bug in Drasi and has an approved issue (issue link required).
  • This pull request adds or changes features of Drasi and has an approved issue (issue link required).
  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Drasi (issue link optional).

Fixes: #issue_number

Signed-off-by: ruokun-niu <ruokunniu@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions workflow that lets maintainers trigger centralized, label-driven PR reviewer workflows hosted in drasi-project/.github. In this codebase, it introduces the automation glue for cross-repo reviewer dispatch without changing application runtime behavior.

Changes:

  • Adds .github/workflows/pr-reviewers.yml to listen for review:* labels on PRs.
  • Maps each supported label to one or more centralized locked reviewer workflows.
  • Dispatches those reviewer workflows via gh workflow run, passing the current PR URL.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +31 to +43
pull_request_target:
types: [labeled]

permissions: {}

env:
REVIEWER_REPO: drasi-project/.github
REVIEWER_REF: main

jobs:
dispatch:
runs-on: ubuntu-latest
if: startsWith(github.event.label.name, 'review:')
Comment on lines +68 to +78
run: |
if [ -z "$GH_TOKEN" ]; then
echo "::error::ORG_DISPATCH_TOKEN is not set or not accessible to this repository."
exit 1
fi
for wf in ${{ steps.reviewers.outputs.workflows }}; do
echo "Dispatching $wf for $PR_URL"
gh workflow run "$wf" \
--repo "$REVIEWER_REPO" \
--ref "$REVIEWER_REF" \
-f pr_url="$PR_URL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants