Commit Graph

30 Commits

Author SHA1 Message Date
Adam
4e2cfdfd29 Enhance PR review workflow with line-specific comments and reaction indicators (#1958)
# READ CAREFULLY THEN REMOVE

Remove bullet points that are not relevant.

PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.

- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.

## Description

Please provide a clear description of your changes.

---

## Type of Change

Please delete options that are not relevant.

- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ]  New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ]  Performance improvement

## Areas Affected

Please check all that apply:

- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure

## Testing Done

Describe the tests you've done:

- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)

## Security Considerations

For changes involving data or authentication:

- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)

## Checklist

- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published

## Additional Notes

Add any other context about the pull request here.

## Screenshots/Recordings

Add screenshots or recordings here if applicable.

---

_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._

    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Improved the PR review workflow by adding line-specific comments and reaction indicators to make feedback clearer and easier to track.

- **New Features**
  - Added support for posting review comments on exact lines in changed files.
  - Added 👀 and  reactions to show when review starts and completes.

<!-- End of auto-generated description by cubic. -->
2025-08-08 11:47:57 -07:00
devin-ai-integration[bot]
ece407c83c Fix critical JSON formatting bug in ampcode workflow (#1955)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Adam <github@ajxb.net>
2025-08-08 11:22:41 -07:00
devin-ai-integration[bot]
9f7803f025 Add automated PR review with ampcode integration (#1952)
# Add automated PR review with ampcode integration

## Summary

This PR introduces a new GitHub Action workflow that automatically reviews pull requests using the Ampcode AI service. When a non-draft PR is opened or updated, the workflow:

- Spins up a containerized Ubuntu environment with Node.js
- Installs the Ampcode CLI (`@sourcegraph/amp`)
- Analyzes changed files in the PR using AI-powered code review
- Posts structured review comments directly on the PR
- Implements scalable matrix strategy for handling multiple concurrent PRs
- Includes proper cleanup and error handling

The workflow is designed to provide immediate, AI-powered feedback on code quality, potential bugs, security issues, and best practices while being scalable to handle multiple PRs simultaneously.

## Review & Testing Checklist for Human

- [ ] **Configure AMPCODE_API_KEY secret** - The workflow requires this secret to be set up in GitHub repository settings before it can function
- [ ] **Test end-to-end with a real PR** - Create a test PR to verify the workflow triggers correctly, ampcode CLI works, and comments are posted as expected
- [ ] **Verify ampcode CLI authentication** - Ensure the API key works with the `@sourcegraph/amp` package and ampcode service
- [ ] **Check GitHub API integration** - Confirm that the JSON formatting for PR comments is correct and doesn't cause API errors
- [ ] **Validate workflow triggers and scaling** - Test that the concurrency controls work properly and multiple PRs can be processed simultaneously

---

### Diagram

```mermaid
%%{ init : { "theme" : "default" }}%%
graph TD
    subgraph "GitHub Actions Workflows"
        WorkflowNew[".github/workflows/<br/>ampcode-pr-review.yml"]:::major-edit
        WorkflowCI[".github/workflows/<br/>ci.yml"]:::context
        WorkflowSync[".github/workflows/<br/>sync-production.yml"]:::context
    end
    
    subgraph "External Services"
        Ampcode["Ampcode AI Service<br/>(ampcode.com)"]:::context
        GitHubAPI["GitHub API<br/>(PR Comments)"]:::context
    end
    
    subgraph "Secrets & Config"
        AmpcodeKey["AMPCODE_API_KEY<br/>(Repository Secret)"]:::context
        GitHubToken["GITHUB_TOKEN<br/>(Built-in)"]:::context
    end
    
    WorkflowNew -->|"Installs & authenticates"| Ampcode
    WorkflowNew -->|"Posts review comments"| GitHubAPI
    WorkflowNew -->|"Requires"| AmpcodeKey
    WorkflowNew -->|"Uses"| GitHubToken
    
    subgraph Legend
        L1[Major Edit]:::major-edit
        L2[Minor Edit]:::minor-edit
        L3[Context/No Edit]:::context
    end
    
    classDef major-edit fill:#90EE90
    classDef minor-edit fill:#87CEEB
    classDef context fill:#FFFFFF
```

### Notes


- **Security consideration**: The workflow uses the AMPCODE_API_KEY secret and GitHub token for API access. Ensure the ampcode service is trusted before enabling.
- **Performance**: The workflow has a 15-minute timeout and processes up to 50 changed files to prevent resource exhaustion.
- **File filtering**: Only reviews common code file types (ts, tsx, js, jsx, py, etc.) to focus on relevant content.
- **Scalability**: Uses matrix strategy with max 3 parallel jobs and concurrency controls to handle multiple PRs efficiently.

**Link to Devin run**: https://app.devin.ai/sessions/d48a696c401a4b2a9c54dcf487601fd0  
**Requested by**: Adam (@MrgSub)
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Added a GitHub Action that automatically reviews PRs using Ampcode, posting structured feedback on code quality, bugs, and best practices.

- **New Features**
 - Runs on PR open or update for main and staging branches.
 - Installs Ampcode CLI, analyzes up to 50 changed files, and posts review comments.
 - Handles multiple PRs with concurrency controls and error handling.
 - Requires AMPCODE_API_KEY secret for authentication.

<!-- End of auto-generated description by cubic. -->
2025-08-08 11:07:07 -07:00
amrit
76b7330e0c fix: update cron schedule and improve conflict detection in PR closures (#1945)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-08-07 14:19:31 +05:30
amrit
b0f860003f feat: add auto closing of issues / pull requests based on staleness (#1944)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Added GitHub workflows to automatically close stale issues and pull requests with unresolved merge conflicts older than 3 days.

- **Automation**
  - Closes open pull requests with merge conflicts after 3 days.
  - Closes issues immediately when marked as stale.

<!-- End of auto-generated description by cubic. -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **Chores**
  * Introduced automated workflows to close old pull requests with unresolved merge conflicts and to close stale issues, helping keep the repository clean and up to date.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-06 21:02:55 -07:00
Adam
277f476575 cleanup on isle zero (#1699)
Ran oxc (https://oxc.rs/docs/guide/usage/linter.html#vscode-extension) and fixed all the issues that came up, set it up to run as a PR check and added steps to the README.md asking users to use it.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
  * Introduced JavaScript linting using oxlint in development guidelines and CI workflow for improved code quality.
  * Added oxlint configuration and dependencies to the project.

* **Bug Fixes**
  * Improved error logging in various components and utilities for better debugging.
  * Enhanced React list rendering by updating keys to use unique values instead of array indices, reducing rendering issues.
  * Replaced browser alerts with toast notifications for a smoother user experience.

* **Refactor**
  * Simplified component logic and state management by removing unused code, imports, props, and components across multiple files.
  * Updated function and component signatures for clarity and maintainability.
  * Improved efficiency of certain operations by switching from arrays to sets for membership checks.

* **Chores**
  * Cleaned up and reorganized import statements throughout the codebase.
  * Removed deprecated files, components, and middleware to streamline the codebase.

* **Documentation**
  * Updated contribution guidelines to include linting requirements for code submissions.

* **Style**
  * Minor formatting and readability improvements in JSX and code structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-10 10:59:40 -07:00
Rahul Mishra
40cf7d2313 chore: make deploy CI better (#1162)
### TL;DR

Improved the production deployment workflow with better error handling and clearer instructions.

### What changed?

- Renamed `auto-merge-prod.yml` to `deploy-to-prod-command.yml` to better reflect its purpose
- Updated workflow name from "Deploy Production" to "Deploy to Production Command"
- Changed job name to "Merge Staging to Production" for clarity
- Added proper error handling when rebase fails by posting a comment to the PR instead of failing silently
- Added explicit condition for the push step to only run when rebase succeeds
- Updated the sync-production workflow to include clear instructions in the PR body instead of creating a draft PR
- Added guidance in the PR body explaining how to deploy using the `/deploy` command

### How to test?

1. Create a PR from staging to main
2. Comment `/deploy` on the PR to trigger the deployment workflow
3. Verify that the workflow correctly merges staging into main when possible
4. Test the error case by creating a conflict between staging and main, then verify the workflow posts a helpful error comment

### Why make this change?

This change improves the developer experience by providing clearer feedback during the deployment process. The improved error handling helps developers understand when manual intervention is needed, and the updated PR template provides explicit instructions on how to complete the deployment. Renaming the workflow files and jobs also makes their purpose more obvious to team members.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Chores**
  - Updated deployment workflow to require a specific comment format and label for production deploys.
  - Enhanced error handling during rebase with clearer instructions for manual intervention.
  - Automated pull requests for syncing staging to production now include deployment instructions, a production-deploy label, and are no longer created as drafts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-30 22:31:13 +05:30
BlankParticle
a6ec63a06c chore: add auto merge CI (#1155)
Added a GitHub workflow to automatically deploy to production when staging PRs are approved by MrgSub.

Created a new GitHub workflow file `.github/workflows/auto-merge-prod.yml` that:
- Triggers when a pull request is approved
- Checks if the PR is from staging to main and was approved by MrgSub
- Automatically rebases main on staging
- Pushes the changes to main if the rebase is successful

1. Create a PR from staging to main
2. Have the GitHub user MrgSub approve the PR
3. Verify that the workflow runs and successfully rebases main on staging

To streamline the deployment process to production by automating the merge from staging to main when approved by the designated reviewer. This reduces manual steps and potential human error during the deployment process.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

- **Chores**
  - Introduced a new automated workflow to deploy changes to production when specific pull requests are approved. This streamlines the release process and ensures only approved updates are merged and deployed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-30 13:27:50 +05:30
Rahul Mishra
db38aac034 chore: add CI to sync to main branch (#1091) 2025-05-26 13:27:39 -07:00
Rahul Mishra
ef9df9970a chore: run lingo-dev CI on staging (#1089)
## Description

Send Lingo.dev PRs to staging

---

## Type of Change

Please delete options that are not relevant.

- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ]  New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ]  Performance improvement

## Areas Affected

Please check all that apply:

- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure

## Testing Done

Describe the tests you've done:

- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)

## Security Considerations

For changes involving data or authentication:

- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)

## Checklist

- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published

## Additional Notes

Add any other context about the pull request here.

## Screenshots/Recordings

Add screenshots or recordings here if applicable.

---

_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
2025-05-26 13:27:39 -07:00
Aj Wazzan
5fe48ca848 chore: add .nvmrc file for Node version management; update CI workflows to remove version specifications for pnpm and Node 2025-05-20 02:14:16 -07:00
BlankParticle
fa45abaf44 feat: remixify and whatever else needed to be done 2025-05-20 13:56:47 +05:30
Aj Wazzan
67561c3799 chore: remove unused cache configuration from CI workflows 2025-05-03 22:49:35 -07:00
Aj Wazzan
0cf2f0a34a refactor: simplify CI workflow by removing environment variable for RUNNER_IMAGE 2025-05-03 22:48:30 -07:00
Aj Wazzan
b4b60b1b07 fix: update CI workflow to use github.env for RUNNER_IMAGE 2025-05-03 22:42:09 -07:00
Aj Wazzan
999e38288b Enhance CI workflows by adding concurrency settings, updating runner images to use 'ubuntu-latest', and adjusting timeout values. Also, switched to actions/setup-node@v4 and enabled caching for bun dependencies. 2025-04-28 16:49:28 -07:00
blacksmith-sh[bot]
d7991381ee Migrate workflows to Blacksmith 2025-04-25 21:06:26 +00:00
Max Prilutskiy
7aa7e3451b feat: pull request mode @LingoDotDev 2025-04-14 12:22:26 -07:00
Max Prilutskiy
c04f24ae0a chore: enable @LingoDotDev pull request mode 2025-04-14 11:58:07 -07:00
maxprilutskiy
04a5f6f137 feat: install @LingoDotDev 2025-04-10 15:12:55 -07:00
Aj Wazzan
84d2f2b890 saving... 2025-03-21 09:20:53 -07:00
Aj Wazzan
8de0716ffb saving... 2025-03-20 17:12:43 -07:00
Aj Wazzan
86a9c7331c saving... 2025-03-16 22:58:38 -07:00
Aj Wazzan
1b8c5d75e4 saving... 2025-03-16 22:51:12 -07:00
Aj Wazzan
8c4257fe76 minor 2025-03-16 22:22:20 -07:00
Aj Wazzan
c85b1193c4 minor 2025-03-16 22:21:09 -07:00
Aj Wazzan
32ead7c008 minor 2025-03-16 22:19:07 -07:00
nizzy
8b139d8c84 feat: migrate to bun (#443) 2025-03-14 14:41:55 -04:00
Aj Wazzan
27a77f5f25 minor 2025-03-06 16:13:42 -08:00
Rahul Mishra
2c00726c00 chore: add prettier, format and add CI (#34) 2025-02-06 14:17:20 -05:00