Skip to content

feat: Add native Git commit linking and keyword status triggers to DevTrack issues (#2663)#3191

Open
Neelr1912 wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
Neelr1912:feature/git-commit-linking
Open

feat: Add native Git commit linking and keyword status triggers to DevTrack issues (#2663)#3191
Neelr1912 wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
Neelr1912:feature/git-commit-linking

Conversation

@Neelr1912

Copy link
Copy Markdown

Problem Statement

Previously, developers had to manually update DevTrack issues to match their Git commits or pull request progress, which was time-consuming and often resulted in tracking boards getting out of sync with codebases.

Solution

We have introduced a native Git integration that parses commit messages from linked GitHub and GitLab repositories to automatically link commits to referenced issues and update their statuses based on configured triggers.

Key Changes

  1. Core Parser & Logic (src/lib/git-commit-linking.ts):

    • Implemented a protocol-agnostic URL normalizer (normalizeRepoUrl) to match repository links.
    • Built a commit message regex parser that extracts issue references (e.g. DT-402) and optional trigger keywords.
    • Handled duplicate commit associations gracefully and added idempotency guards so identical webhook events do not log repeated activities.
  2. Keyword Triggers & Status Transitions:

    • Matches standard closing keywords (e.g., Fixes, Resolves, Closes) to transition issues to the Done column.
    • Matches review keywords (e.g., Review, In-Review) to transition issues to the In Review column.
    • Logs status transitions and commit details directly into the devtrack_issue_activities timeline.
  3. Webhook Subsystems:

    • Integrated commit checking directly into the GitHub push webhook handler (src/app/api/webhooks/github/route.ts).
    • Created a brand-new webhook endpoint for GitLab (src/app/api/webhooks/gitlab/route.ts) supporting verification via token headers.
  4. Project Settings Management UI (src/app/dashboard/settings/page.tsx):

    • Added a DevTrack Projects settings section to link and unlink Git repositories.
    • Implemented toggles to enable or disable keyword triggers per project.
    • Included clear visual setup instructions for configuring repository webhooks in GitHub/GitLab.
  5. Project API (src/app/api/projects/[id]/route.ts):

    • Added a PATCH handler to allow updating project settings on the server side.

Verification

  • Dependencies installed and workspace builds correctly.
  • TypeScript compiler compilation check verified successfully:
    npx tsc --noEmit

@github-actions

Copy link
Copy Markdown

Hi @Neelr1912 — thanks for the PR! 🙌

DevTrack asks contributors to ⭐ star the repo before a PR can be merged. It takes two seconds and is the easiest way to support the project.

Once you've starred, the star-required check turns green automatically (give it a moment). Thanks for contributing!

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:feature GSSoC type bonus: new feature labels Jul 12, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@github-actions github-actions Bot added type:bug GSSoC type bonus: bug fix type:performance GSSoC type bonus: performance (+15 pts) labels Jul 12, 2026
@Neelr1912

Copy link
Copy Markdown
Author

Closes #2663

This PR introduces native Git commit linking with automatic issue reference detection, keyword-based status transitions, GitHub and GitLab webhook support, and project-level repository integration settings.

Verification

Ready for review. Looking forward to your feedback!

@github-actions github-actions Bot added the type:devops GSSoC type bonus: devops (+15 pts) label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:devops GSSoC type bonus: devops (+15 pts) type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant