Skip to content
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

/annotate #248

Open
shiv810 opened this issue Jan 15, 2025 · 5 comments
Open

/annotate #248

shiv810 opened this issue Jan 15, 2025 · 5 comments

Comments

@shiv810
Copy link
Collaborator

shiv810 commented Jan 15, 2025

There are situations where we write about certain issues that were likely to have been posted in the past, but are difficult to find.

Imagine if using vector embeddings, we can instantly link to whatever issues are being referenced:

We had some problems with KV, so I don't know if it's wise to enable plugin communication without fixing the problem (I can't find the issue about this). Alternatively we could make this as part of a module inside text-conversation-rewards

From https://www.github.com/kingsley-einstein/contributions-scan/pull/4#issuecomment-2577468623

Using this command, we should replicate the behavior of issue deduplication on the existing comment and edit/add the footnotes with links to the source issues.

A limitation that I see is how wide of a search we should conduct. 1 Within the same repository is somewhat useless, and globally might incur too much noise.

Organization wide might be the best default, but sometimes it would be very useful, especially for us using three organizations, to do a global annotation/search.

Perhaps we can have optional arguments to scope the search.

/annotate https://www.github.com/kingsley-einstein/contributions-scan/pull/4#issuecomment-2577468623 global

But default can be just

/annotate

And it will automatically annotate the previous comment with an organization wide search.

Footnotes

  1. ⚠ 73% possible duplicate - Implement ubiquity-os logger instead of console logs

Copy link

test-app-ubo bot commented Jan 15, 2025

@shiv810
Copy link
Collaborator Author

shiv810 commented Jan 15, 2025

/ask I wonder if there is a more suitable command name instead of annotate which will make more sense for a global search as the default. Please provide some options.

Copy link

test-app-ubo bot commented Jan 15, 2025

Certainly! Choosing a command name that clearly conveys its purpose can enhance usability and user understanding. Here are several alternative command names to replace /annotate, each emphasizing the global search functionality:

  1. /linkIssues

    • Description: Clearly indicates the action of linking related issues, making it evident that the command establishes connections between duplicates or related topics.
  2. /findRelated

    • Description: Emphasizes the search for related issues across repositories or the organization, highlighting the discovery aspect of the command.
  3. /searchGlobal

    • Description: Highlights that the search operates on a global scale, encompassing all repositories within the organization rather than being limited to a single repository.
  4. /issueConnect

    • Description: Suggests the action of connecting similar or related issues, emphasizing the relational aspect of issue management.
  5. /associateIssues

    • Description: Implies associating similar issues for better organization and management, indicating a structured approach to handling duplicates.
  6. /referenceIssues

    • Description: Focuses on referencing relevant issues, making it clear that the command links to existing discussions or problems.
  7. /deduplicate

    • Description: Directly addresses the deduplication process, making the command’s purpose explicitly clear to users aiming to eliminate redundant issues.
  8. /issueMapper

    • Description: Suggests mapping issues to one another, indicating a comprehensive overview and organization of related issues within the platform.
  9. /globalSearch

    • Description: Conveys that the command performs a comprehensive search across all repositories, ensuring users understand the extensive scope of the search functionality.
  10. /issueFinder

    • Description: Implies finding and identifying relevant issues, making it straightforward for users to understand the command’s purpose in locating related issues.

Recommendation:

Choose a command name that best aligns with the primary functionality and resonates with your team's terminology. For instance, if the emphasis is on linking related issues, /linkIssues or /associateIssues would be appropriate. If highlighting the comprehensive search scope is more critical, /searchGlobal or /globalSearch might be better fits.

Implementing one of these alternatives can enhance clarity and ensure that users intuitively understand the command's purpose, thereby improving overall efficiency in managing and referencing issues within your projects.

@shiv810
Copy link
Collaborator Author

shiv810 commented Jan 23, 2025

/ask could you help me making a plan for solving this issue?

Copy link

test-app-ubo bot commented Jan 23, 2025

Certainly! Here's a structured plan to address Issue #248 regarding enhancing issue referencing using vector embeddings:


1. Define Objectives and Requirements

  • Objective: Implement a feature that allows users to reference past issues seamlessly using the /annotate command, leveraging vector embeddings for efficient retrieval.
  • Key Requirements:
    • Enable automatic linking of referenced issues in comments.
    • Support organization-wide searches by default with optional scoping parameters.
    • Ensure stability and reliability of the /annotate command based on previous stability concerns.

2. Design the Solution

  • Vector Embedding Integration:

    • Utilize the OpenAI API to generate and manage vector embeddings for existing issues and comments.
    • Store embeddings in Supabase for scalable and efficient database management.
  • Command Syntax and Functionality:

    • Define the /annotate command structure.
      • Default Usage:
        /annotate
        Performs an organization-wide search.
      • Scoped Usage:
        /annotate global
        Allows optional arguments to narrow or expand the search scope.
  • Search Scope Configuration:

    • Implement optional arguments to specify the search scope (e.g., specific repositories or organizations).

3. Develop the Implementation

  • Backend Development:

    • GitHub API Integration:
      • Use Octokit to interact with GitHub's REST API and handle webhook events.
    • Annotation Logic:
      • Develop the logic to process the /annotate command, perform vector-based searches, and update comments with appropriate links.
  • Environment Setup:

    • Manage environment variables securely using dotenv.
  • Code Quality and Standards:

    • Implement TypeScript with TypeScript ESLint for type safety and linting.
    • Use ESLint and Prettier for consistent code formatting and quality.

4. Testing

  • Unit and Integration Tests:

    • Write comprehensive tests using Jest and ts-jest to ensure all functionalities work as expected.
  • Stability Testing:

    • Address previous stability issues by thoroughly testing the /annotate command under various scenarios, including toggling draft pulls, leaving reviews, and handling label events.

5. Deployment

  • Cloudflare Workers Deployment:

    • Deploy the updated functionality using Cloudflare Workers with Wrangler for seamless serverless execution.
  • CI/CD Pipeline:

    • Set up GitHub Actions to automate testing and deployment processes.
    • Enforce commit standards and hooks using Commitlint and Husky to maintain code integrity.

6. Documentation and Training

  • Update Documentation:

    • Provide clear guidelines on using the /annotate command, including examples for different scopes.
  • Team Training:

    • Educate the team on the new feature, its usage, and best practices to ensure smooth adoption.

7. Monitoring and Feedback

  • Logging and Monitoring:

    • Implement robust logging to monitor the performance and usage of the /annotate command.
  • Collect Feedback:

    • Gather user feedback to identify any issues or areas for improvement, allowing for iterative enhancements.

8. Address Potential Challenges

  • Vector Embedding Accuracy:

    • Ensure the embeddings accurately represent the context of issues to provide relevant search results.
  • Performance Optimization:

    • Optimize database queries in Supabase to handle large volumes of data efficiently.
  • Scalability:

    • Design the system to scale as the number of issues and comments grows, maintaining quick response times.

By following this comprehensive plan, you can effectively implement the enhanced issue referencing feature, ensuring it is robust, user-friendly, and integrates seamlessly with your existing infrastructure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant