-
Notifications
You must be signed in to change notification settings - Fork 1
feat: GithubProjects adapter. #13
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for GitHub Projects V2 via a new GithubProjectAdapter and enhances the core adapter base and existing adapters with unified error mapping, status normalization, and webhook support.
- Introduces
GithubProjectAdapterwith GraphQL connection, project/item CRUD, comments, and webhook parsing. - Extends
ActiveProject::Adapters::Basewith status mapping, error rescue macros, and webhook capability checks. - Updates documentation and dependencies to include GitHub Projects and reorder Faraday gems.
Reviewed Changes
Copilot reviewed 67 out of 67 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/active_project/adapters/trello_adapter.rb | Refactor error parsing in handle_faraday_error |
| lib/active_project/adapters/trello/connection.rb | Update auth param names and broaden invalid-ID detection |
| lib/active_project/adapters/jira_adapter.rb | Add AttributeNormalizer include and wrap create/update methods |
| lib/active_project/adapters/jira/connection.rb | Refactor header check and remove frozen string literals |
| lib/active_project/adapters/jira/issues.rb | Add argument validation to update_issue |
| lib/active_project/adapters/github_project_adapter.rb | New adapter class for GitHub Projects V2 |
| lib/active_project/adapters/github_project/*.rb | New modules for connection, projects, issues, comments, helpers, webhooks |
| lib/active_project/adapters/base.rb | Enhance base class with error mapping, status methods, webhooks |
| activeproject.gemspec | Reorder and add Faraday retry dependency |
| README.md | Document GitHub Projects adapter support and usage examples |
Comments suppressed due to low confidence (6)
lib/active_project/adapters/github_project/projects.rb:131
- [nitpick] In the GitHub Projects adapter,
adapter_sourceis set to:githubbut elsewhere uses:github_project. Consider unifying on:github_projectto match the adapter name.
adapter_source: :github,
lib/active_project/adapters/github_project/issues.rb:238
- [nitpick] This
adapter_sourceis set to:github, which is inconsistent with theGithubProjectAdapternamespace. Use:github_projectfor clarity.
adapter_source: :github,
lib/active_project/adapters/github_project/helpers.rb:71
- [nitpick] The helper’s
map_userusesadapter_source: :github, but the adapter isGithubProjectAdapter. Align this to:github_project.
adapter_source: :github,
lib/active_project/adapters/jira/attribute_normalizer.rb:1
- Consider adding unit tests for
AttributeNormalizer#normalize_issue_attrsto cover the title-to-summary conversion.
# frozen_string_literal: true
lib/active_project/adapters/github_project_adapter.rb:15
- Add tests for
get_current_userandconnected?in the newGithubProjectAdapterto ensure GraphQL errors and missing data are handled as expected.
def get_current_user
lib/active_project/adapters/jira/connection.rb:57
- The code references
last_response, which isn’t defined in this context. You likely meant to check theresobject returned byrequest_rest, e.g.,if res.headers[...].include?(...).
if last_response&.headers&.[](SERAPH_HEADER)&.include?("AUTHENTICATED_FAILED")
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added support got Github Issues for a Repo as a Project * Add tests for Github ORM Interface and ActiveProject * Add Github Examples to README * refactor: HTTP logic to use centralized HttpClient module Centralized HTTP request handling into a reusable HttpClient module, simplifying and standardizing logic across adapters. Updated adapters (Trello, Basecamp, and Jira) to use the new module, reducing duplication and improving maintainability. * feat(core): introduce Async I/O pathway • add async, async-http & async-http-faraday to gemspec • HttpClient now selects adapter via AP_DEFAULT_ADAPTER (defaults to :net_http) • Pagination mix-in with each_page / each_page_async helpers • ActiveProject::Async.run wrapper for easy task spawning • Trello::Connection: map 400 "invalid id" → NotFoundError (kept in same file) • CI matrix entry with AP_DEFAULT_ADAPTER=async_http * feat(rails): auto-install Async::Scheduler via Railtie • lib/active_project/railtie.rb sets Fiber scheduler before Zeitwerk • config flag config.active_project.use_async_scheduler (default true) • env-var opt-out AP_NO_ASYNC_SCHEDULER=1 • main file requires railtie only when Rails::Railtie is defined • adds AS::Notifications event "active_project.async_scheduler_set" * chore(master): release active_project 0.3.0 * refactor(basecamp): move HTTP plumbing to Connections::Rest (#12) * feat: GithubProjects adapter. (#13) * feat: Github project adapter. * feat(github): implement webhook processing for GitHub Projects V2 * Update lib/active_project/adapters/base.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: rename adapter to GithubRepo --------- Co-authored-by: Abdelkader Boudih <terminale@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
Not same as GithubRepo in #8