-
Notifications
You must be signed in to change notification settings - Fork 0
[#287] π - Release Deploy Issues #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 9fb0e48
Enhance deployment process: Implement issue closure after successful β¦
efraespada d1727cf
Refactor issue closure logic in DeployedActionUseCase: Move issue cloβ¦
efraespada bcd8870
Update parentBranch assignment logic in BranchRepository: Allow parenβ¦
efraespada ab6b2a5
Update documentation and features: Add workflow concurrency details tβ¦
efraespada 35e215e
Update action.yml and documentation: Clarify OpenCode server API key β¦
efraespada 43c4031
Enhance documentation for OpenCode integration: Clarify usage of enviβ¦
efraespada b2dae54
Enhance GitHub Actions workflows and AI features: Update workflow runβ¦
efraespada c893807
Refactor GitHub Actions workflows: Simplify branch filtering by usingβ¦
efraespada e71f43a
Remove obsolete `hotfix-workflow` parameter from GitHub Actions workfβ¦
efraespada b9cb092
Update documentation and workflows: Add new content handlers for PR dβ¦
efraespada 6af8211
Enhance documentation: Update contributing guidelines to include Mintβ¦
efraespada cf71906
Update documentation: Add new sections for pull request and single acβ¦
efraespada 92cbcaf
Add new methods for issue and pull request comment management: Implemβ¦
efraespada a0f6e5f
Implement `detect-potential-problems` command: Replace `detect-errorsβ¦
efraespada 5843eb7
Refactor OpenCode operations to include retry logic: Implement `withOβ¦
efraespada 52470de
Enhance OpenCode interaction schemas: Introduce JSON schemas for Thinβ¦
efraespada 47971aa
Implement OpenCode configuration validation and JSON parsing: Introduβ¦
efraespada 224c53c
Enhance OpenCode message logging: Introduce a new function `summarizeβ¦
efraespada ceac50c
Implement OpenCode status monitoring and rate limit handling: Introduβ¦
efraespada 585f6e6
Refactor OpenCode session handling: Remove rate limit polling and relβ¦
efraespada 8461d87
Refactor OpenCode session handling: Remove rate limit polling functioβ¦
efraespada 52b5a3c
Enhance OpenCode error handling and logging: Improve error messages iβ¦
efraespada 901c5bd
Add marker replacement functionality: Introduce regex-based marker reβ¦
efraespada 88f2d63
Sanitize finding IDs in markers: Introduce a new function to sanitizeβ¦
efraespada 83dadb3
Refactor PR comment handling: Simplify the logic for creating and updβ¦
efraespada d3a19b3
Enhance issue and PR comment retrieval: Implement pagination for listβ¦
efraespada e4755de
Refactor PR comment creation and error handling: Enhance the logic foβ¦
efraespada 2cbf75b
Add functionality to retrieve first line numbers from PR diffs: Impleβ¦
efraespada 013e77c
gh-action: updated compiled files
efraespada 02026e8
Refactor PR comment creation to use Promise.allSettled: Update the loβ¦
efraespada 513cf7a
Update pull request review thread resolution logic: Refactor the `resβ¦
efraespada 7a47d40
Enhance PR review thread resolution with pagination: Update the `resoβ¦
efraespada 0737212
Refactor and enhance bug detection use case: Update the `DetectPotentβ¦
efraespada 539a8b3
Add bugbot severity input and enhance documentation: Introduce a new β¦
efraespada c40e952
Add bugbot comment limit input and enhance functionality: Introduce aβ¦
efraespada 8ed3690
Integrate CheckChangesIssueSizeUseCase and CheckProgressUseCase into β¦
efraespada cd4b882
Add path validation for findings in PR review comments: Implement funβ¦
efraespada c6bc251
Refactor merge handling in DeployedActionUseCase: Introduce a mechaniβ¦
efraespada fbce5e7
Enhance merge failure handling in DeployedActionUseCase: Introduce coβ¦
efraespada 5c5b598
Implement getCurrentReviewers method in PullRequestRepository: Enhancβ¦
efraespada 5b51aec
Refactor PR review comment handling: Update the logic in `DetectPotenβ¦
efraespada 7010923
Enhance configuration handling in Execution and ConfigurationHandler:β¦
efraespada 033b696
Update test messages in SyncSizeAndProgressLabelsFromIssueToPrUseCaseβ¦
efraespada c4a9e2f
Refactor payload initialization in ConfigurationHandler: Change the dβ¦
efraespada 78774b5
Refactor label synchronization steps in SyncSizeAndProgressLabelsFromβ¦
efraespada e73024e
Add input validation to workflows: Implement checks for version, issuβ¦
efraespada daa64c1
Update status type in BranchRepository: Adjust the order of status vaβ¦
efraespada File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| --- | ||
elisalopez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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`. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} | ||
elisalopez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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 }} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.