From 829f06294fcb8b6a7015267c8430cf36bdc63935 Mon Sep 17 00:00:00 2001 From: Garrison Snelling Date: Fri, 17 Jul 2026 10:35:12 -0500 Subject: [PATCH 1/3] feat: Add Droid @droid tag response workflow --- .github/workflows/droid.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/droid.yml diff --git a/.github/workflows/droid.yml b/.github/workflows/droid.yml new file mode 100644 index 00000000..6dbbe661 --- /dev/null +++ b/.github/workflows/droid.yml @@ -0,0 +1,38 @@ +name: Droid Tag + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] + pull_request: + types: [opened, edited] + +jobs: + droid: + if: | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@droid')) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@droid')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@droid')) || + (github.event_name == 'issues' && (contains(github.event.issue.body, '@droid') || contains(github.event.issue.title, '@droid'))) || + (github.event_name == 'pull_request' && (contains(github.event.pull_request.body, '@droid') || contains(github.event.pull_request.title, '@droid'))) + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + issues: write + id-token: write + actions: read + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 1 + - name: Run Droid Exec + uses: Factory-AI/droid-action@main + with: + factory_api_key: ${{ secrets.FACTORY_API_KEY }} From 74c4925260f3990f0a745d772cde8561d1a191d4 Mon Sep 17 00:00:00 2001 From: Garrison Snelling Date: Fri, 17 Jul 2026 20:47:14 -0500 Subject: [PATCH 2/3] fix: Use comment-only triggers for @droid responses --- .github/workflows/droid.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/droid.yml b/.github/workflows/droid.yml index 6dbbe661..5a55e1a3 100644 --- a/.github/workflows/droid.yml +++ b/.github/workflows/droid.yml @@ -5,21 +5,15 @@ on: types: [created] pull_request_review_comment: types: [created] - issues: - types: [opened, assigned] pull_request_review: types: [submitted] - pull_request: - types: [opened, edited] jobs: droid: if: | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@droid')) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@droid')) || - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@droid')) || - (github.event_name == 'issues' && (contains(github.event.issue.body, '@droid') || contains(github.event.issue.title, '@droid'))) || - (github.event_name == 'pull_request' && (contains(github.event.pull_request.body, '@droid') || contains(github.event.pull_request.title, '@droid'))) + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@droid')) runs-on: ubuntu-latest permissions: contents: read From 61d6c3c464d2b036ff033e1d9799cf3eb2dfe367 Mon Sep 17 00:00:00 2001 From: Garrison Snelling Date: Fri, 17 Jul 2026 22:20:37 -0500 Subject: [PATCH 3/3] fix: Sync security-hardened droid.yml from computesdk PR --- .github/workflows/droid.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/droid.yml b/.github/workflows/droid.yml index 5a55e1a3..eb479e1a 100644 --- a/.github/workflows/droid.yml +++ b/.github/workflows/droid.yml @@ -11,22 +11,28 @@ on: jobs: droid: if: | - (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@droid')) || - (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@droid')) || - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@droid')) + github.actor != 'dependabot[bot]' && ( + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@droid') && contains(fromJson('["MEMBER", "OWNER", "COLLABORATOR"]'), github.event.comment.author_association)) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@droid') && contains(fromJson('["MEMBER", "OWNER", "COLLABORATOR"]'), github.event.comment.author_association)) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@droid') && contains(fromJson('["MEMBER", "OWNER", "COLLABORATOR"]'), github.event.review.author_association)) + ) runs-on: ubuntu-latest permissions: contents: read pull-requests: write issues: write - id-token: write actions: read + env: + FACTORY_API_KEY: ${{ secrets.FACTORY_API_KEY }} steps: - name: Checkout repository - uses: actions/checkout@v5 + if: env.FACTORY_API_KEY != '' + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 1 + persist-credentials: false - name: Run Droid Exec - uses: Factory-AI/droid-action@main + if: env.FACTORY_API_KEY != '' + uses: Factory-AI/droid-action@7c7bfea2aa3bb7ea87579402cc1d89dbcf6b13b3 # main with: - factory_api_key: ${{ secrets.FACTORY_API_KEY }} + factory_api_key: ${{ env.FACTORY_API_KEY }}