Skip to content

feat: add issue tracker provider abstraction#107

Merged
iKwesi merged 5 commits intomainfrom
feat/issue-46-issue-tracker-providers
Mar 16, 2026
Merged

feat: add issue tracker provider abstraction#107
iKwesi merged 5 commits intomainfrom
feat/issue-46-issue-tracker-providers

Conversation

@iKwesi
Copy link
Copy Markdown
Owner

@iKwesi iKwesi commented Mar 16, 2026

Summary

  • add a shared issue-tracker provider contract and resolver
  • keep GitHub support behind the shared contract and add a GitLab provider
  • wire sf status through the provider layer with provider-aware reporting and tests

Closes #46

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a shared issue-tracker provider abstraction so SpecForge can resolve and operate against multiple tracker backends (GitHub and GitLab) while keeping sf/specforge status and status notifications provider-aware.

Changes:

  • Added shared issue-tracker contracts and a provider resolver (core/trackers/*), including a GitHub adapter and a GitLab provider.
  • Updated status runner/reporting and webhook notification payloads to use the shared status contract (adds provider and request_kind).
  • Expanded CLI and tests to support selecting/passing a tracker provider (e.g. --provider gitlab) and validating GitLab behavior.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/trackers/provider.test.ts Adds tests for provider inference and resolver injection.
tests/notifications/status-notifiers.test.ts Updates notifier tests to the shared IssueTrackerPullRequestStatus type.
tests/gitlab/provider.test.ts Adds GitLab provider tests for MR creation and status mapping.
tests/diagnostics/status.test.ts Updates status diagnostics tests for provider-aware reporting and adds GitLab coverage.
tests/cli/status-command.test.ts Verifies CLI passes --provider through to the status runner.
src/demo/goldenDemo.ts Updates demo status payload to include provider and request_kind.
src/core/trackers/provider.ts Adds provider inference/resolution and GitHub adapter to the shared contract.
src/core/trackers/contracts.ts Defines shared types/contracts and common status derivation logic.
src/core/notifiers/statusNotifiers.ts Switches notification event payloads to the shared status contract.
src/core/gitlab/provider.ts Implements GitLab provider using glab CLI behind the shared contract.
src/core/diagnostics/status.ts Routes runStatus through the issue-tracker provider layer and reports provider/kind.
src/cli.ts Adds --provider option for status and normalizes provider selection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 introduces a shared issue-tracker provider abstraction to support multiple backends (GitHub + new GitLab provider) and wires sf status through that provider layer so status reporting and notifications work provider-independently.

Changes:

  • Add shared issue tracker contracts + provider resolver (with GitHub adapter and GitLab provider implementation).
  • Update sf status plumbing (CLI option + status runner + notifier payload types) to use the shared provider status contract.
  • Add/adjust tests to cover provider resolution, GitLab provider behavior, and provider-aware status reporting.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/trackers/provider.test.ts New tests for provider inference/resolution.
tests/notifications/status-notifiers.test.ts Update notifier tests to use shared IssueTrackerPullRequestStatus.
tests/gitlab/provider.test.ts New tests for GitLab provider createPullRequest + getPullRequestStatus.
tests/diagnostics/status.test.ts Update status tests for provider-aware fields + add non-GitHub provider coverage.
tests/cli/status-command.test.ts Add CLI test ensuring --provider is forwarded to the status runner.
src/demo/goldenDemo.ts Update demo status fixture to include provider/request_kind fields.
src/core/trackers/provider.ts New provider resolver + GitHub adapter + URL inference.
src/core/trackers/contracts.ts New shared types + shared deriveOverallStatus.
src/core/notifiers/statusNotifiers.ts Switch notifier event payload typing to shared status contract.
src/core/gitlab/provider.ts New GitLab provider implementation using glab api.
src/core/diagnostics/status.ts Route runStatus through issue tracker provider + include provider metadata in report.
src/cli.ts Add --provider option and update status command copy to be tracker-agnostic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 introduces a provider-agnostic issue tracker abstraction so sf status (and related status notification/reporting) can work with both GitHub pull requests and GitLab merge requests via a shared contract.

Changes:

  • Added shared IssueTrackerProvider contract + provider resolver/inference for GitHub/GitLab.
  • Implemented a GitLab provider (glab-backed) and adapted the existing GitHub provider behind the shared contract.
  • Updated status reporting, webhook notification payload types, CLI flags, and tests to be provider-aware.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/trackers/provider.test.ts Tests provider inference + explicit provider injection.
tests/notifications/status-notifiers.test.ts Switches notifier payload typing to shared status contract.
tests/gitlab/provider.test.ts Adds unit coverage for GitLab provider create/status behaviors.
tests/diagnostics/status.test.ts Verifies provider-aware status reporting + formatting.
tests/cli/status-command.test.ts Ensures --provider is passed through to the status runner.
src/demo/goldenDemo.ts Updates demo status fixture with provider/request kind.
src/core/trackers/provider.ts Adds resolver/inference + GitHub adapter to shared provider contract.
src/core/trackers/contracts.ts Defines the shared provider/status contracts + shared overall-status derivation.
src/core/notifiers/statusNotifiers.ts Generalizes notification event payload type to shared status contract.
src/core/gitlab/provider.ts New GitLab provider implementation using glab api.
src/core/github/provider.ts Reuses shared deriveOverallStatus helper.
src/core/diagnostics/status.ts Wires status flow through shared provider + provider-aware report formatting.
src/cli.ts Adds --provider flag and updates status command help text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 introduces an issue-tracker provider abstraction so status/PR operations can work across multiple tracker backends (GitHub + new GitLab provider) without coupling the rest of the codebase to GitHub-specific types and behaviors.

Changes:

  • Added shared issue-tracker contracts + a provider resolver (core/trackers/*) and adapted the existing GitHub provider to the shared status contract.
  • Implemented a GitLab provider (via glab api) for creating merge requests and fetching merge request status.
  • Updated sf status plumbing/output and notifier payloads to carry provider-aware fields, with expanded test coverage.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/trackers/provider.test.ts Adds unit coverage for provider inference/resolution.
tests/notifications/status-notifiers.test.ts Switches notifier event typing to provider-agnostic status payload.
tests/gitlab/provider.test.ts Adds coverage for GitLab provider create/status behaviors and error cases.
tests/diagnostics/status.test.ts Verifies provider-aware status report formatting and non-GitHub flows.
tests/cli/status-command.test.ts Ensures --provider is forwarded into the status runner input.
tests/cli/help-output.test.ts Updates CLI help expectations for GitLab merge request support.
src/demo/goldenDemo.ts Updates demo status result shape to include provider/request_kind.
src/core/trackers/provider.ts New provider resolver + GitHub adapter + GitLab URL inference.
src/core/trackers/contracts.ts New shared provider/status contracts + shared overall-status derivation.
src/core/notifiers/statusNotifiers.ts Uses shared IssueTrackerPullRequestStatus in events.
src/core/gitlab/provider.ts New GitLab provider implementation using glab.
src/core/github/provider.ts Reuses shared deriveOverallStatus implementation.
src/core/diagnostics/status.ts Uses issue-tracker provider abstraction and prints provider-aware report fields.
src/cli.ts Adds --provider option and updates status help text/behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 introduces a shared issue-tracker provider abstraction so SpecForge can resolve and operate against multiple tracker backends (GitHub and the newly added GitLab provider) while keeping the sf status flow provider-aware.

Changes:

  • Added a shared issue-tracker provider contract (contracts) and resolver/adapter (provider) with GitHub adaptation and GitLab support.
  • Implemented a GitLab provider backed by glab for creating merge requests and retrieving merge request status behind the shared contract.
  • Updated sf status plumbing, reporting output, notifier payload typing, and tests to carry provider + request_kind through the stack.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/trackers/provider.test.ts Adds coverage for provider inference and explicit provider resolution/injection.
tests/notifications/status-notifiers.test.ts Updates notifier test fixtures to use the shared status contract.
tests/gitlab/provider.test.ts Adds comprehensive tests for GitLab provider create/status mapping and error cases.
tests/diagnostics/status.test.ts Updates runStatus tests for provider-aware status results and report output.
tests/cli/status-command.test.ts Ensures CLI --provider is passed through to the status runner.
tests/cli/help-output.test.ts Validates updated status command help text for GitHub vs GitLab refs.
src/demo/goldenDemo.ts Updates demo status fixture to include provider metadata.
src/core/trackers/provider.ts Introduces provider inference + resolver and GitHub adapter to the shared contract.
src/core/trackers/contracts.ts Defines the common provider/status contracts and shared deriveOverallStatus.
src/core/notifiers/statusNotifiers.ts Switches notifier event payload typing to the shared status contract.
src/core/gitlab/provider.ts Adds the GitLab provider implementation using glab api.
src/core/github/provider.ts Switches to shared deriveOverallStatus implementation.
src/core/diagnostics/status.ts Wires runStatus through the provider resolver and updates report formatting.
src/cli.ts Adds --provider option and updates status command copy and argument handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iKwesi iKwesi merged commit 9e32e71 into main Mar 16, 2026
8 checks passed
@iKwesi iKwesi deleted the feat/issue-46-issue-tracker-providers branch March 16, 2026 07:45
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

Successfully merging this pull request may close these issues.

Add additional issue tracker providers beyond GitHub

2 participants