Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
f843af7
Enhance deployment process: Close issues after successful deployment …
efraespada Feb 9, 2026
9fb0e48
Enhance deployment process: Implement issue closure after successful …
efraespada Feb 9, 2026
d1727cf
Refactor issue closure logic in DeployedActionUseCase: Move issue clo…
efraespada Feb 9, 2026
bcd8870
Update parentBranch assignment logic in BranchRepository: Allow paren…
efraespada Feb 9, 2026
ab6b2a5
Update documentation and features: Add workflow concurrency details t…
efraespada Feb 9, 2026
35e215e
Update action.yml and documentation: Clarify OpenCode server API key …
efraespada Feb 9, 2026
43c4031
Enhance documentation for OpenCode integration: Clarify usage of envi…
efraespada Feb 9, 2026
b2dae54
Enhance GitHub Actions workflows and AI features: Update workflow run…
efraespada Feb 9, 2026
c893807
Refactor GitHub Actions workflows: Simplify branch filtering by using…
efraespada Feb 9, 2026
e71f43a
Remove obsolete `hotfix-workflow` parameter from GitHub Actions workf…
efraespada Feb 9, 2026
b9cb092
Update documentation and workflows: Add new content handlers for PR d…
efraespada Feb 9, 2026
6af8211
Enhance documentation: Update contributing guidelines to include Mint…
efraespada Feb 9, 2026
cf71906
Update documentation: Add new sections for pull request and single ac…
efraespada Feb 9, 2026
92cbcaf
Add new methods for issue and pull request comment management: Implem…
efraespada Feb 9, 2026
a0f6e5f
Implement `detect-potential-problems` command: Replace `detect-errors…
efraespada Feb 9, 2026
5843eb7
Refactor OpenCode operations to include retry logic: Implement `withO…
efraespada Feb 9, 2026
52470de
Enhance OpenCode interaction schemas: Introduce JSON schemas for Thin…
efraespada Feb 9, 2026
47971aa
Implement OpenCode configuration validation and JSON parsing: Introdu…
efraespada Feb 9, 2026
224c53c
Enhance OpenCode message logging: Introduce a new function `summarize…
efraespada Feb 9, 2026
ceac50c
Implement OpenCode status monitoring and rate limit handling: Introdu…
efraespada Feb 9, 2026
585f6e6
Refactor OpenCode session handling: Remove rate limit polling and rel…
efraespada Feb 9, 2026
8461d87
Refactor OpenCode session handling: Remove rate limit polling functio…
efraespada Feb 9, 2026
52b5a3c
Enhance OpenCode error handling and logging: Improve error messages i…
efraespada Feb 9, 2026
901c5bd
Add marker replacement functionality: Introduce regex-based marker re…
efraespada Feb 9, 2026
88f2d63
Sanitize finding IDs in markers: Introduce a new function to sanitize…
efraespada Feb 9, 2026
83dadb3
Refactor PR comment handling: Simplify the logic for creating and upd…
efraespada Feb 9, 2026
d3a19b3
Enhance issue and PR comment retrieval: Implement pagination for list…
efraespada Feb 9, 2026
e4755de
Refactor PR comment creation and error handling: Enhance the logic fo…
efraespada Feb 10, 2026
2cbf75b
Add functionality to retrieve first line numbers from PR diffs: Imple…
efraespada Feb 10, 2026
013e77c
gh-action: updated compiled files
efraespada Feb 10, 2026
02026e8
Refactor PR comment creation to use Promise.allSettled: Update the lo…
efraespada Feb 10, 2026
513cf7a
Update pull request review thread resolution logic: Refactor the `res…
efraespada Feb 10, 2026
7a47d40
Enhance PR review thread resolution with pagination: Update the `reso…
efraespada Feb 10, 2026
0737212
Refactor and enhance bug detection use case: Update the `DetectPotent…
efraespada Feb 10, 2026
539a8b3
Add bugbot severity input and enhance documentation: Introduce a new …
efraespada Feb 10, 2026
c40e952
Add bugbot comment limit input and enhance functionality: Introduce a…
efraespada Feb 10, 2026
8ed3690
Integrate CheckChangesIssueSizeUseCase and CheckProgressUseCase into …
efraespada Feb 10, 2026
cd4b882
Add path validation for findings in PR review comments: Implement fun…
efraespada Feb 10, 2026
c6bc251
Refactor merge handling in DeployedActionUseCase: Introduce a mechani…
efraespada Feb 10, 2026
fbce5e7
Enhance merge failure handling in DeployedActionUseCase: Introduce co…
efraespada Feb 10, 2026
5c5b598
Implement getCurrentReviewers method in PullRequestRepository: Enhanc…
efraespada Feb 10, 2026
5b51aec
Refactor PR review comment handling: Update the logic in `DetectPoten…
efraespada Feb 10, 2026
7010923
Enhance configuration handling in Execution and ConfigurationHandler:…
efraespada Feb 10, 2026
033b696
Update test messages in SyncSizeAndProgressLabelsFromIssueToPrUseCase…
efraespada Feb 10, 2026
c4a9e2f
Refactor payload initialization in ConfigurationHandler: Change the d…
efraespada Feb 10, 2026
78774b5
Refactor label synchronization steps in SyncSizeAndProgressLabelsFrom…
efraespada Feb 10, 2026
e73024e
Add input validation to workflows: Implement checks for version, issu…
efraespada Feb 11, 2026
daa64c1
Update status type in BranchRepository: Adjust the order of status va…
efraespada Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .cursor/rules/architecture.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
description: Git Board Flow – entry points, flow, and key paths
alwaysApply: true
---

# Architecture & Key Paths

## Entry and main flow

1. **GitHub Action**: `src/actions/github_action.ts` reads inputs, builds `Execution`, calls `mainRun(execution)` from `common_action.ts`.
2. **CLI**: `src/actions/local_action.ts` same flow with CLI/config inputs.
3. **common_action.ts**: Sets up; calls `waitForPreviousRuns(execution)` (sequential workflow); then:
- **Single action** β†’ `SingleActionUseCase`
- **Issue** β†’ `IssueCommentUseCase` or `IssueUseCase`
- **Pull request** β†’ `PullRequestReviewCommentUseCase` or `PullRequestUseCase`
- **Push** β†’ `CommitUseCase`

## Key paths

| Area | Path | Purpose |
|------|------|--------|
| Action entry | `src/actions/github_action.ts` | Reads inputs, builds Execution |
| CLI entry | `src/cli.ts` β†’ `local_action.ts` | Same flow, local inputs |
| Shared flow | `src/actions/common_action.ts` | mainRun, waitForPreviousRuns, dispatch to use cases |
| Use cases | `src/usecase/` | issue_use_case, pull_request_use_case, commit_use_case, single_action_use_case |
| Single actions | `src/usecase/actions/` | check_progress, detect_errors, recommend_steps, think, initial_setup, create_release, create_tag, publish_github_action, deployed_action |
| Steps (issue) | `src/usecase/steps/issue/` | check_permissions, close_not_allowed_issue, assign_members, update_title, update_issue_type, link_issue_project, check_priority_issue_size, prepare_branches, remove_issue_branches, remove_not_needed_branches, label_deploy_added, label_deployed_added, move_issue_to_in_progress |
| Steps (PR) | `src/usecase/steps/pull_request/` | update_title, assign_members (issue), assign_reviewers_to_issue, link_pr_project, link_pr_issue, sync_size_and_progress_from_issue, check_priority_pull_request_size, update_description (AI), close_issue_after_merging |
| Steps (commit) | `src/usecase/steps/commit/` | notify commit, check size |
| Steps (issue comment) | `src/usecase/steps/issue_comment/` | check_issue_comment_language (translation) |
| Steps (PR review comment) | `src/usecase/steps/pull_request_review_comment/` | check_pull_request_comment_language (translation) |
| Manager (content) | `src/manager/` | description handlers, configuration_handler, markdown_content_hotfix_handler (PR description, hotfix changelog content) |
| Models | `src/data/model/` | Execution, Issue, PullRequest, SingleAction, etc. |
| Repos | `src/data/repository/` | branch_repository, issue_repository, workflow_repository, ai_repository (OpenCode), file_repository, project_repository |
| Config | `src/utils/constants.ts` | INPUT_KEYS, ACTIONS, defaults |
| Metadata | `action.yml` | Action inputs and defaults |

## Single actions (by name)

- `check_progress_action`, `detect_errors_action`, `recommend_steps_action` (need `single-action-issue`)
- `think_action`, `initial_setup` (no issue)
- `create_release` (version, title, changelog), `create_tag` (version), `publish_github_action`, `deployed_action` (issue)

## CLI-only (not single actions)

- **Copilot**: `giik copilot -p "..."` uses OpenCode build agent via `AiRepository.copilotMessage` in `src/cli.ts`. No workflow single-action equivalent.

## Concurrency (sequential runs)

`common_action.ts` calls `waitForPreviousRuns(execution)` (from `src/utils/queue_utils.ts`): lists workflow runs, waits until no previous run of the **same workflow name** is in progress/queued, then continues. Implemented in `WorkflowRepository.getActivePreviousRuns`.
34 changes: 34 additions & 0 deletions .cursor/rules/code-conventions.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
description: Git Board Flow – coding conventions and where to change things
globs: src/**/*.ts
alwaysApply: false
---

# Code Conventions

## Logging and constants

- Use **logger**: `logInfo`, `logError`, `logDebugInfo` from `src/utils/logger`. No ad-hoc `console.log`.
- Use **constants**: `INPUT_KEYS` and `ACTIONS` from `src/utils/constants.ts` for input names and action names. No hardcoded strings for these.

## Adding a new action input

1. **`action.yml`**: Add the input with `description` and `default` (if any).
2. **`src/utils/constants.ts`**: Add the key to `INPUT_KEYS` (e.g. `NEW_INPUT: 'new-input'`).
3. **`src/actions/github_action.ts`**: Read the input (e.g. `core.getInput(INPUT_KEYS.NEW_INPUT)`) and pass it into the object used to build `Execution`.
4. **Optional**: If the CLI must support it, add to `local_action.ts` and the corresponding CLI option.

## Where to change content/descriptions

- **PR description** (template filling, AI content): `src/manager/description/` (configuration_handler, content interfaces).
- **Hotfix/release changelog** (markdown extraction, formatting): `src/manager/description/markdown_content_hotfix_handler.ts`.

## Build and bundles

- The project uses **`@vercel/ncc`** to bundle the action and CLI. Keep imports and dependencies compatible with ncc (no dynamic requires that ncc cannot see).
- **Do not** edit or rely on `build/`; it is generated. Run tests and lint only on `src/`.

## Style and lint

- Prefer TypeScript; avoid `any` (lint rule: no-explicit-any).
- Run `npm run lint` before committing; use `npm run lint:fix` when possible.
43 changes: 15 additions & 28 deletions .cursor/rules/project-context.mdc
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
---
description: Git Board Flow project context, commands, and conventions
description: Git Board Flow – quick read, commands, and where to find more
alwaysApply: true
---

# Git Board Flow – Project Context

**Git Board Flow** is a GitHub Action (and local CLI) that automates branch management, GitHub project linking, and issue/PR tracking using Git-Flow. It uses **OpenCode** for all AI features (progress detection, error detection, PR descriptions, copilot).
## Quick read (for fast understanding)

## Tech stack
- **What it is**: GitHub Action + CLI that automates Git-Flow: creates branches from issue labels, links issues/PRs to projects, tracks commits; AI via OpenCode (progress, errors, PR descriptions).
- **Entry points**: GitHub Action β†’ `src/actions/github_action.ts`; CLI β†’ `src/cli.ts`. Shared logic in `src/actions/common_action.ts` (single actions vs issue/PR/push).
- **Do**: Use Node 20, run from repo root; edit only `src/`; use `INPUT_KEYS`/`ACTIONS` and `logInfo`/`logError`/`logDebugInfo`. When adding inputs: update `action.yml`, `constants.ts` (INPUT_KEYS), and `github_action.ts` (and optionally `local_action.ts`).
- **Don’t**: Edit or depend on `build/` (generated by `ncc`); run tests/lint on `build/`.

- **Runtime**: Node.js 20 (use `nvm use 20` before running commands).
- **Language**: TypeScript.
- **Build**: `@vercel/ncc` bundles the action and CLI into `build/`.
- **Tests**: Jest.

## Commands (run from repo root)
## Commands (repo root)

```bash
nvm use 20
Expand All @@ -27,27 +25,16 @@ npm run lint
npm run lint:fix
```

- **Build**: `npm run build` – compiles `src/actions/github_action.ts` β†’ `build/github_action/`, `src/cli.ts` β†’ `build/cli/`, and sets the CLI as executable.
- **Tests**: `npm test` – runs Jest (exclude e2e when relevant). Use `npm run test:watch` for watch mode, `npm run test:coverage` for coverage.
- **Lint**: `npm run lint` – ESLint + typescript-eslint on `src/` (recommended + unused-vars, no-explicit-any). Use `npm run lint:fix` to auto-fix.
- **Build**: `npm run build` β†’ bundles `github_action.ts` and `cli.ts` into `build/`.
- **Tests**: Jest; `npm run test:watch` / `npm run test:coverage` as needed.
- **Lint**: ESLint + typescript-eslint on `src/`; `npm run lint:fix` to auto-fix.

## What to ignore

- **`build/`** – Compiled output (bundled JS, generated .d.ts). Do not edit or rely on it; treat it as generated. Do not run tests or lint against `build/`.
- **`.agent-sessions/`** – Session data; ignore in context unless debugging sessions.

## Key paths

- `src/actions/github_action.ts` – GitHub Action entry; reads inputs and runs the main flow.
- `src/actions/local_action.ts` – CLI entry; same logic with local/config inputs.
- `src/actions/common_action.ts` – Shared flow: single actions vs issue/PR/push pipelines.
- `src/usecase/` – Use cases (issue, pull request, commit, single actions).
- `src/data/model/` – Domain models (Execution, Ai, Issue, etc.).
- `src/data/repository/ai_repository.ts` – OpenCode API (ask, askAgent, copilotMessage); no separate agent layer.
- `action.yml` – Action metadata and input definitions.
- **`build/`** – Generated output; do not edit or run tests/lint against it.
- **`.agent-sessions/`** – Session data; ignore unless debugging.

## Conventions
## Other rules

- Prefer TypeScript; keep action and CLI buildable with `ncc`.
- Use existing logger (`logInfo`, `logError`, `logDebugInfo`) and constants (`INPUT_KEYS`, `ACTIONS`) instead of ad-hoc strings.
- When adding inputs, update `action.yml`, `INPUT_KEYS` in `src/utils/constants.ts`, and the corresponding read in `github_action.ts` (and optionally `local_action.ts`).
- **Architecture & paths**: see `architecture.mdc` (entry points, use cases, single actions, key files).
- **Code conventions**: see `code-conventions.mdc` (logger, constants, adding inputs, ncc).
1 change: 0 additions & 1 deletion .github/workflows/gbf_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
with:
ai-ignore-files: build/*
debug: ${{ vars.DEBUG }}
hotfix-workflow: release_workflow.yml
opencode-model: ${{ vars.OPENCODE_MODEL }}
project-ids: 2
token: ${{ secrets.PAT }}
3 changes: 1 addition & 2 deletions .github/workflows/gbf_issue_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
git-board-issues:
name: Git Board - Issue Comment
runs-on: [self-hosted, macOS, X64]
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -16,7 +16,6 @@ jobs:
with:
ai-ignore-files: build/*
debug: ${{ vars.DEBUG }}
hotfix-workflow: release_workflow.yml
opencode-model: ${{ vars.OPENCODE_MODEL }}
project-ids: 2
token: ${{ secrets.PAT }}
1 change: 0 additions & 1 deletion .github/workflows/gbf_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:

- uses: ./
with:
ai-pull-request-description: true
ai-ignore-files: build/*
debug: ${{ vars.DEBUG }}
opencode-model: ${{ vars.OPENCODE_MODEL }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/gbf_pull_request_review_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ on:
jobs:
git-board-pull-requests:
name: Git Board - Pull Request Review Comment
runs-on: [self-hosted, macOS, X64]
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: ./
with:
ai-ignore-files: build/*
ai-pull-request-description: true
debug: ${{ vars.DEBUG }}
opencode-model: ${{ vars.OPENCODE_MODEL }}
project-ids: 2
Expand Down
161 changes: 161 additions & 0 deletions .github/workflows/hotfix_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: Task - Hotfix

on:
workflow_dispatch:
inputs:
version:
description: 'Hotfix version'
required: true
default: '1.0.0'
title:
description: 'Title'
required: true
default: 'New Version'
changelog:
description: 'Changelog'
required: true
default: '- Several improvements'
issue:
description: 'Launcher issue'
required: true
default: '-1'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
prepare-version-files:
name: Prepare files for hotfix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Validate inputs
env:
VERSION: ${{ github.event.inputs.version }}
ISSUE: ${{ github.event.inputs.issue }}
TITLE: ${{ github.event.inputs.title }}
CHANGELOG: ${{ github.event.inputs.changelog }}
run: |
err=0
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::error::Version must be in semver format (e.g. 1.0.0)."
err=1
fi
if ! [[ "$ISSUE" =~ ^-?[0-9]+$ ]]; then
echo "::error::Issue must be a number (e.g. 123 or -1)."
err=1
fi
if [[ ${#TITLE} -gt 1000 ]]; then
echo "::error::Title must be at most 1000 characters."
err=1
fi
if [[ ${#CHANGELOG} -gt 50000 ]]; then
echo "::error::Changelog must be at most 50000 characters."
err=1
fi
[[ $err -eq 0 ]] || exit 1

- name: Update version
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
packageJson.version = '${{ github.event.inputs.version }}';
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 2));

- name: Commit updated package.json and dist directory
uses: EndBug/add-and-commit@v9
with:
add: './build/ ./package.json'
committer_name: GitHub Actions
committer_email: actions@github.com
default_author: user_info
message: 'gh-action: updated compiled files and bumped version to ${{ github.event.inputs.version }} (hotfix)'

prepare-compiled-files:
name: Update compiled files
runs-on: ubuntu-latest
needs: prepare-version-files
steps:
- uses: actions/checkout@v4

- name: Pull latest changes
run: |
git config --global user.email "efraespada@gmail.com"
git config --global user.name "Efra Espada"
git pull --no-ff --no-edit

- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install Dependencies
run: npm install

- name: Build Files
run: npm run build

- name: Force add build directory
run: git add -f ./build/

- name: Commit updated dist directory
uses: EndBug/add-and-commit@v9
with:
committer_name: GitHub Actions
committer_email: actions@github.com
default_author: user_info
message: 'gh-action: updated compiled files'

tag:
name: Publish version
runs-on: ubuntu-latest
needs: [ prepare-compiled-files ]
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Git Board Flow - Create Tag
uses: ./
if: ${{ success() }}
with:
debug: ${{ vars.DEBUG }}
single-action: 'create_tag'
single-action-issue: '${{ github.event.inputs.issue }}'
single-action-version: '${{ github.event.inputs.version }}'
token: ${{ secrets.PAT }}

- name: Git Board Flow - Create Release
uses: ./
if: ${{ success() }}
with:
debug: ${{ vars.DEBUG }}
single-action: 'create_release'
single-action-issue: '${{ github.event.inputs.issue }}'
single-action-version: '${{ github.event.inputs.version }}'
single-action-title: '${{ github.event.inputs.title }}'
single-action-changelog: '${{ github.event.inputs.changelog }}'
token: ${{ secrets.PAT }}

- name: Git Board Flow - Publish Github Action Version
uses: ./
if: ${{ success() }}
with:
debug: ${{ vars.DEBUG }}
single-action: 'publish_github_action'
single-action-issue: '${{ github.event.inputs.issue }}'
single-action-version: '${{ github.event.inputs.version }}'
token: ${{ secrets.PAT }}

- name: Git Board Flow - Deploy success notification
uses: ./
if: ${{ success() }}
with:
debug: ${{ vars.DEBUG }}
single-action: 'deployed_action'
single-action-issue: '${{ github.event.inputs.issue }}'
opencode-model: ${{ vars.OPENCODE_MODEL }}
token: ${{ secrets.PAT }}
Loading