From 81a0a09b67a57bba5a2b1a7e39907d3d0f163629 Mon Sep 17 00:00:00 2001 From: Talha Naqvi Date: Tue, 16 Jun 2026 20:45:16 +0530 Subject: [PATCH] fix(ci): restrict agent workflows to Talha --- .github/workflows/agent-android-bot.yml | 16 ++++++++++------ .github/workflows/agent-bot.yml | 16 ++++++++++------ .github/workflows/agent-fix.yml | 24 ++++++++++++++---------- .github/workflows/agent-triage.yml | 2 ++ 4 files changed, 36 insertions(+), 22 deletions(-) diff --git a/.github/workflows/agent-android-bot.yml b/.github/workflows/agent-android-bot.yml index c17a3e9f7..387dd0dfa 100644 --- a/.github/workflows/agent-android-bot.yml +++ b/.github/workflows/agent-android-bot.yml @@ -42,14 +42,18 @@ jobs: bot: runs-on: ubuntu-latest if: >- - github.event_name == 'workflow_dispatch' || + github.actor == 'naqvitalha' && + github.triggering_actor == 'naqvitalha' && ( - contains(github.event.comment.body || github.event.review.body, '@android-agent') && - !contains(github.event.comment.body || github.event.review.body, '/fix') && + github.event_name == 'workflow_dispatch' || ( - (github.event.comment.author_association || github.event.review.author_association) == 'OWNER' || - (github.event.comment.author_association || github.event.review.author_association) == 'MEMBER' || - (github.event.comment.author_association || github.event.review.author_association) == 'COLLABORATOR' + contains(github.event.comment.body || github.event.review.body, '@android-agent') && + !contains(github.event.comment.body || github.event.review.body, '/fix') && + ( + (github.event.comment.author_association || github.event.review.author_association) == 'OWNER' || + (github.event.comment.author_association || github.event.review.author_association) == 'MEMBER' || + (github.event.comment.author_association || github.event.review.author_association) == 'COLLABORATOR' + ) ) ) steps: diff --git a/.github/workflows/agent-bot.yml b/.github/workflows/agent-bot.yml index 6d759e16b..40144836c 100644 --- a/.github/workflows/agent-bot.yml +++ b/.github/workflows/agent-bot.yml @@ -39,14 +39,18 @@ jobs: bot: runs-on: macos-latest if: >- - github.event_name == 'workflow_dispatch' || + github.actor == 'naqvitalha' && + github.triggering_actor == 'naqvitalha' && ( - contains(github.event.comment.body || github.event.review.body, '@agent') && - !contains(github.event.comment.body || github.event.review.body, '/fix') && + github.event_name == 'workflow_dispatch' || ( - (github.event.comment.author_association || github.event.review.author_association) == 'OWNER' || - (github.event.comment.author_association || github.event.review.author_association) == 'MEMBER' || - (github.event.comment.author_association || github.event.review.author_association) == 'COLLABORATOR' + contains(github.event.comment.body || github.event.review.body, '@agent') && + !contains(github.event.comment.body || github.event.review.body, '/fix') && + ( + (github.event.comment.author_association || github.event.review.author_association) == 'OWNER' || + (github.event.comment.author_association || github.event.review.author_association) == 'MEMBER' || + (github.event.comment.author_association || github.event.review.author_association) == 'COLLABORATOR' + ) ) ) steps: diff --git a/.github/workflows/agent-fix.yml b/.github/workflows/agent-fix.yml index 692413121..e1eb837e0 100644 --- a/.github/workflows/agent-fix.yml +++ b/.github/workflows/agent-fix.yml @@ -31,18 +31,22 @@ jobs: fix: runs-on: macos-latest if: >- + github.actor == 'naqvitalha' && + github.triggering_actor == 'naqvitalha' && ( - github.event.action == 'labeled' && - github.event.label.name == 'agent-fix' && - github.event.sender.type != 'Bot' - ) || ( - github.event.action == 'created' && - contains(github.event.comment.body, '/fix') && - !github.event.issue.pull_request && ( - github.event.comment.author_association == 'OWNER' || - github.event.comment.author_association == 'MEMBER' || - github.event.comment.author_association == 'COLLABORATOR' + github.event.action == 'labeled' && + github.event.label.name == 'agent-fix' && + github.event.sender.type != 'Bot' + ) || ( + github.event.action == 'created' && + contains(github.event.comment.body, '/fix') && + !github.event.issue.pull_request && + ( + github.event.comment.author_association == 'OWNER' || + github.event.comment.author_association == 'MEMBER' || + github.event.comment.author_association == 'COLLABORATOR' + ) ) ) steps: diff --git a/.github/workflows/agent-triage.yml b/.github/workflows/agent-triage.yml index a625bef71..04c8814fa 100644 --- a/.github/workflows/agent-triage.yml +++ b/.github/workflows/agent-triage.yml @@ -13,6 +13,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 if: >- + github.actor == 'naqvitalha' && + github.triggering_actor == 'naqvitalha' && github.event.label.name == 'agent-triage' && github.event.sender.type != 'Bot' steps: