From 3db07e56e57a50ef25f4a587a3bb1956dc5e64e3 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Thu, 23 Apr 2026 13:33:20 +0000 Subject: [PATCH 1/3] fix(workflow): apply trigger fixes for Cogni AI Agent --- .github/workflows/cogni-ai-agent.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cogni-ai-agent.yml b/.github/workflows/cogni-ai-agent.yml index f9156a7..1694878 100644 --- a/.github/workflows/cogni-ai-agent.yml +++ b/.github/workflows/cogni-ai-agent.yml @@ -3,9 +3,17 @@ name: Cogni AI Agent # yamllint disable-line rule:truthy on: + issues: + types: + - opened + - reopened issue_comment: types: - created + pull_request: + types: + - opened + - reopened pull_request_review_comment: types: - created @@ -57,7 +65,7 @@ concurrency: cancel-in-progress: false group: >- cogni-ai-agent-${{ - (github.event.issue.pull_request && github.event.issue.number) + github.event.issue.number || github.event.pull_request.number || (github.ref_name != github.event.repository.default_branch && github.ref) || github.run_id @@ -124,4 +132,10 @@ jobs: touch*: allow true*: allow vim*: allow - prompt: ${{ github.event.comment.body || inputs.prompt }} + prompt: >- + ${{ + github.event.comment.body || + github.event.issue.body || + github.event.pull_request.body || + inputs.prompt + }} From c7b82a1d22d41b1a9fd320c571f5e4a72fc4543b Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Thu, 23 Apr 2026 14:08:10 +0000 Subject: [PATCH 2/3] Fix PR #37 & pre-commit issues Co-authored-by: kenorb --- .github/AGENTS.md | 1 - .github/workflows/cogni-ai-agent.yml | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/AGENTS.md b/.github/AGENTS.md index 39a4785..b643200 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -10,7 +10,6 @@ Read these Agent files when working in corresponding dirs: ## Additional key files -- [.github/copilot-instructions.md](copilot-instructions.md): main coding standards for agents. - [.github/FIREWALL.md](FIREWALL.md): firewall configuration and recommended hosts for agents. ## Hardened NEVER List diff --git a/.github/workflows/cogni-ai-agent.yml b/.github/workflows/cogni-ai-agent.yml index 1694878..fac84af 100644 --- a/.github/workflows/cogni-ai-agent.yml +++ b/.github/workflows/cogni-ai-agent.yml @@ -6,17 +6,22 @@ on: issues: types: - opened + - edited - reopened issue_comment: types: - created + - edited pull_request: types: - opened + - edited - reopened + - synchronize pull_request_review_comment: types: - created + - edited workflow_dispatch: inputs: model: @@ -74,6 +79,9 @@ jobs: cogni-ai-agent: name: Run Cogni AI agent runs-on: ubuntu-latest + if: | + github.event_name != 'issues' || + !github.event.issue.pull_request permissions: contents: write id-token: write @@ -132,6 +140,7 @@ jobs: touch*: allow true*: allow vim*: allow + # Use comment body if available, otherwise fall back to issue/PR body or manual input. prompt: >- ${{ github.event.comment.body || From 4ed3cf02fd821b8fa1dd7288f75071b9f2193546 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Thu, 23 Apr 2026 14:41:30 +0000 Subject: [PATCH 3/3] Remove workflow concurrency block Co-authored-by: kenorb --- .github/workflows/cogni-ai-agent.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/cogni-ai-agent.yml b/.github/workflows/cogni-ai-agent.yml index fac84af..941daaf 100644 --- a/.github/workflows/cogni-ai-agent.yml +++ b/.github/workflows/cogni-ai-agent.yml @@ -59,22 +59,6 @@ on: description: Prompt for the agent required: true type: string -# Prevent concurrent runs on the same branch to avoid push conflicts. -# When a new run is triggered, it will queue until the previous pending run completes. -# On the default branch each run gets a unique group (github.run_id) so runs can -# proceed in parallel, since each one branches off to its own new branch. -# This logic assumes the workflow is triggered only by issue/PR-related events or branches -# (and will fall back to github.run_id otherwise) to ensure correct grouping. -# See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency -concurrency: - cancel-in-progress: false - group: >- - cogni-ai-agent-${{ - github.event.issue.number - || github.event.pull_request.number - || (github.ref_name != github.event.repository.default_branch && github.ref) - || github.run_id - }} jobs: cogni-ai-agent: name: Run Cogni AI agent