From 8561f15d14ed5c9c8da9daeb0348420401f30bda Mon Sep 17 00:00:00 2001 From: "Marcus R. Brown" Date: Fri, 13 Feb 2026 03:38:38 -0700 Subject: [PATCH 1/6] feat: add Fro Bot agent workflow - Introduced a new GitHub Actions workflow for the Fro Bot. - Configured triggers for issue comments, pull requests, and scheduled audits. - Included prompts for manual and scheduled runs to guide the bot's actions. --- .github/workflows/fro-bot.yaml | 78 ++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/fro-bot.yaml diff --git a/.github/workflows/fro-bot.yaml b/.github/workflows/fro-bot.yaml new file mode 100644 index 00000000..4ec8f052 --- /dev/null +++ b/.github/workflows/fro-bot.yaml @@ -0,0 +1,78 @@ +--- +# Run the Fro Bot agent to review issues and PRs, triggered by comments, PR events, or on a schedule. +name: Fro Bot + +on: + # Trigger on new comments to issues and pull requests + issue_comment: + types: [created] + # Automatically review pull requests to the main branch + pull_request: + branches: [main] + types: [opened, synchronize, reopened, ready_for_review] + # Daily repository audit + schedule: + - cron: '0 0 * * *' # Every day at midnight + # Run manually with a custom prompt + workflow_dispatch: + inputs: + prompt: + description: Custom prompt for the Fro Bot agent + required: false + +permissions: + contents: read + +jobs: + fro-bot: + # Only @fro-bot mentions and maintainers, exclude self + if: >- + github.event_name != 'issue_comment' || + ( + contains(github.event.comment.body || '', '@fro-bot') && + (github.event.comment.user.login || '') != 'fro-bot' && + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association || '') + ) + name: Fro Bot + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + token: ${{ secrets.FRO_BOT_PAT }} + + - name: Authenticate gh CLI as Fro Bot + run: | + echo "${{ secrets.FRO_BOT_PAT }}" | gh auth login --with-token + gh auth status + + - name: Setup Bun + uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Run Fro Bot + uses: fro-bot/agent@v0 + env: + OPENCODE_PROMPT_ARTIFACT: 'true' + PROMPT: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.prompt || env.DEFAULT_PROMPT) || (github.event_name == 'schedule' && env.SCHEDULE_PROMPT) || '' }} + DEFAULT_PROMPT: | + You are Fro Bot, an AI assistant for managing GitHub repositories. Your tasks include: + - Reviewing new issues and pull requests + - Providing feedback and suggestions + - Triaging and labeling issues + - Assisting with code reviews + - Engaging with the community to keep the repository healthy and active + You have been triggered by a recent event. Please analyze the context and take appropriate actions to help maintain the repository. + SCHEDULE_PROMPT: | + Review the repository's open issues and pull requests. For each item, determine if it is: + - Stale and needs follow-up + - Ready for review + - Needs triage + Summarize your findings in a comment on the issue or PR, or create a new issue if necessary. + with: + auth-json: '{}' + github-token: ${{ secrets.FRO_BOT_PAT }} + prompt: ${{ env.PROMPT }} From c67d1514ae4f44cc63fcf1fafa5c75c6cad2cb53 Mon Sep 17 00:00:00 2001 From: "Marcus R. Brown" Date: Fri, 13 Feb 2026 07:38:33 -0700 Subject: [PATCH 2/6] fix: correct PROMPT variable syntax --- .github/workflows/fro-bot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fro-bot.yaml b/.github/workflows/fro-bot.yaml index 4ec8f052..787ce55b 100644 --- a/.github/workflows/fro-bot.yaml +++ b/.github/workflows/fro-bot.yaml @@ -57,7 +57,7 @@ jobs: uses: fro-bot/agent@v0 env: OPENCODE_PROMPT_ARTIFACT: 'true' - PROMPT: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.prompt || env.DEFAULT_PROMPT) || (github.event_name == 'schedule' && env.SCHEDULE_PROMPT) || '' }} + PROMPT: ${{ (github.event_name == 'workflow_dispatch' && (github.event.inputs.prompt || env.DEFAULT_PROMPT)) || (github.event_name == 'schedule' && env.SCHEDULE_PROMPT) || '' }} DEFAULT_PROMPT: | You are Fro Bot, an AI assistant for managing GitHub repositories. Your tasks include: - Reviewing new issues and pull requests From 84c516c0835a98c859daf09596037f0e91ad9b6d Mon Sep 17 00:00:00 2001 From: "mrbro-bot[bot]" <137683033+mrbro-bot[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 12:39:05 +0000 Subject: [PATCH 3/6] chore(deps): update github/codeql-action action to v4.32.3 (#71) Co-authored-by: mrbro-bot[bot] <137683033+mrbro-bot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yaml | 6 +++--- .github/workflows/scorecard.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml index 869b618b..1ec2326d 100644 --- a/.github/workflows/codeql-analysis.yaml +++ b/.github/workflows/codeql-analysis.yaml @@ -27,15 +27,15 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Initialize CodeQL - uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2 + uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3 with: config-file: ./.github/codeql/codeql-config.yml languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2 + uses: github/codeql-action/autobuild@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2 + uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3 with: category: '/language:${{ matrix.language }}' diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 80b3995b..e51d64b0 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -38,6 +38,6 @@ jobs: retention-days: 5 - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2 + uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3 with: sarif_file: results.sarif From 70dd60c8399a55f8895f170c89e03a3bf94d8e08 Mon Sep 17 00:00:00 2001 From: "Marcus R. Brown" Date: Fri, 13 Feb 2026 07:52:24 -0700 Subject: [PATCH 4/6] ci(fro-bot): add PR review comment trigger and 15-min job timeout --- .github/settings.yml | 1 + .github/workflows/fro-bot.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/settings.yml b/.github/settings.yml index ad80e998..38f50a47 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -16,6 +16,7 @@ branches: [ Build, Docs Build, + Fro Bot, Typecheck, Lint, Test, diff --git a/.github/workflows/fro-bot.yaml b/.github/workflows/fro-bot.yaml index 787ce55b..6846f987 100644 --- a/.github/workflows/fro-bot.yaml +++ b/.github/workflows/fro-bot.yaml @@ -6,6 +6,8 @@ on: # Trigger on new comments to issues and pull requests issue_comment: types: [created] + pull_request_review_comment: + types: [created] # Automatically review pull requests to the main branch pull_request: branches: [main] @@ -35,6 +37,7 @@ jobs: ) name: Fro Bot runs-on: ubuntu-latest + timeout-minutes: 15 steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 From b23cc306f0f2eee4eb1622b4e10bdb728409d719 Mon Sep 17 00:00:00 2001 From: "Marcus R. Brown" Date: Fri, 13 Feb 2026 08:51:34 -0700 Subject: [PATCH 5/6] ci(fro-bot): tighten triggers, prompts, and fork handling --- .github/workflows/fro-bot.yaml | 63 +++++++++++++++++----------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/fro-bot.yaml b/.github/workflows/fro-bot.yaml index 6846f987..0c315752 100644 --- a/.github/workflows/fro-bot.yaml +++ b/.github/workflows/fro-bot.yaml @@ -1,21 +1,16 @@ --- -# Run the Fro Bot agent to review issues and PRs, triggered by comments, PR events, or on a schedule. name: Fro Bot on: - # Trigger on new comments to issues and pull requests issue_comment: types: [created] pull_request_review_comment: types: [created] - # Automatically review pull requests to the main branch pull_request: branches: [main] types: [opened, synchronize, reopened, ready_for_review] - # Daily repository audit schedule: - - cron: '0 0 * * *' # Every day at midnight - # Run manually with a custom prompt + - cron: '0 0 * * *' workflow_dispatch: inputs: prompt: @@ -25,15 +20,40 @@ on: permissions: contents: read +concurrency: + group: fro-bot-${{ github.event.issue.number || github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + DEFAULT_PROMPT: | + You are Fro Bot, an AI assistant for managing GitHub repositories. Your tasks include: + - Reviewing new issues and pull requests + - Providing feedback and suggestions + - Triaging and labeling issues + - Assisting with code reviews + - Engaging with the community to keep the repository healthy and active + You have been triggered by a recent event. Please analyze the context and take appropriate actions to help maintain the repository. + SCHEDULE_PROMPT: | + Review the repository's open issues and pull requests. For each item, determine if it is: + - Stale and needs follow-up + - Ready for review + - Needs triage + Summarize your findings in a comment on the issue or PR, or create a new issue if necessary. + jobs: fro-bot: - # Only @fro-bot mentions and maintainers, exclude self if: >- - github.event_name != 'issue_comment' || ( - contains(github.event.comment.body || '', '@fro-bot') && - (github.event.comment.user.login || '') != 'fro-bot' && - contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association || '') + github.event.pull_request == null || + !github.event.pull_request.head.repo.fork + ) && + ( + (github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment') || + ( + contains(github.event.comment.body || '', '@fro-bot') && + (github.event.comment.user.login || '') != 'fro-bot' && + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association || '') + ) ) name: Fro Bot runs-on: ubuntu-latest @@ -45,11 +65,6 @@ jobs: fetch-depth: 0 token: ${{ secrets.FRO_BOT_PAT }} - - name: Authenticate gh CLI as Fro Bot - run: | - echo "${{ secrets.FRO_BOT_PAT }}" | gh auth login --with-token - gh auth status - - name: Setup Bun uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2 @@ -57,24 +72,10 @@ jobs: run: bun install --frozen-lockfile - name: Run Fro Bot - uses: fro-bot/agent@v0 + uses: fro-bot/agent@4128f01ee624364e420399dba53367c25e120f17 # v0.23.23 env: OPENCODE_PROMPT_ARTIFACT: 'true' PROMPT: ${{ (github.event_name == 'workflow_dispatch' && (github.event.inputs.prompt || env.DEFAULT_PROMPT)) || (github.event_name == 'schedule' && env.SCHEDULE_PROMPT) || '' }} - DEFAULT_PROMPT: | - You are Fro Bot, an AI assistant for managing GitHub repositories. Your tasks include: - - Reviewing new issues and pull requests - - Providing feedback and suggestions - - Triaging and labeling issues - - Assisting with code reviews - - Engaging with the community to keep the repository healthy and active - You have been triggered by a recent event. Please analyze the context and take appropriate actions to help maintain the repository. - SCHEDULE_PROMPT: | - Review the repository's open issues and pull requests. For each item, determine if it is: - - Stale and needs follow-up - - Ready for review - - Needs triage - Summarize your findings in a comment on the issue or PR, or create a new issue if necessary. with: auth-json: '{}' github-token: ${{ secrets.FRO_BOT_PAT }} From 83c87adedd6ea36f867428ef0afd49c568343f95 Mon Sep 17 00:00:00 2001 From: "Marcus R. Brown" Date: Fri, 13 Feb 2026 08:58:18 -0700 Subject: [PATCH 6/6] ci(fro-bot): update agent version to HEAD to get past model issue --- .github/workflows/fro-bot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fro-bot.yaml b/.github/workflows/fro-bot.yaml index 0c315752..e0d3d8ea 100644 --- a/.github/workflows/fro-bot.yaml +++ b/.github/workflows/fro-bot.yaml @@ -72,7 +72,7 @@ jobs: run: bun install --frozen-lockfile - name: Run Fro Bot - uses: fro-bot/agent@4128f01ee624364e420399dba53367c25e120f17 # v0.23.23 + uses: fro-bot/agent@929db5028efcda98199303941e9edd6c54075980 env: OPENCODE_PROMPT_ARTIFACT: 'true' PROMPT: ${{ (github.event_name == 'workflow_dispatch' && (github.event.inputs.prompt || env.DEFAULT_PROMPT)) || (github.event_name == 'schedule' && env.SCHEDULE_PROMPT) || '' }}