-
Notifications
You must be signed in to change notification settings - Fork 0
Add AI adoption tracking and update related documentation #25
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a3e819f
[AI-ASSISTED] Test: Copilot test commit
gundersen-lumn 7a28620
Merge branch 'main' into ai/eric-cop
gundersen-lumn 14d21c9
[AI-ASSISTED] Add AI adoption tracking with git hook and update docum…
gundersen-lumn 77daa0c
Potential fix for pull request finding
gundersen-lumn 951a920
Potential fix for pull request finding
gundersen-lumn 3bf47e0
Potential fix for pull request finding
gundersen-lumn 3923e4b
Potential fix for pull request finding
gundersen-lumn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| #!/bin/bash | ||
| # AI Adoption Signal Detection Hook | ||
| # Auto-tags commits assisted by GitHub Copilot or other AI tools | ||
| # Idempotent: safe to run on every commit | ||
|
|
||
| COMMIT_MSG_FILE=$1 | ||
| COMMIT_SOURCE=$2 | ||
|
|
||
| # Skip if commit is from merge or squash (auto-generated commit messages) | ||
| if [ "$COMMIT_SOURCE" = "merge" ] || [ "$COMMIT_SOURCE" = "squash" ]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Read current commit message | ||
| COMMIT_MSG=$(cat "$COMMIT_MSG_FILE") | ||
|
|
||
| # Check for AI signals in multiple places | ||
| # Signal 1: GitHub Copilot co-author metadata | ||
| HAS_COPILOT_COAUTHOR=$(echo "$COMMIT_MSG" | grep -qi "co-authored-by.*github copilot" && echo 1 || echo 0) | ||
|
|
||
| # Signal 2: Explicit AI markers at start of message | ||
| HAS_COPILOT_MARKER=$(echo "$COMMIT_MSG" | grep -qiE "^(copilot|ai-assisted|@copilot):" && echo 1 || echo 0) | ||
|
|
||
| # Signal 3: AI tool mentions in commit body | ||
| HAS_AI_PATTERN=$(echo "$COMMIT_MSG" | grep -qiE "(copilot|claude|gpt|cursor|ai-assisted)" && echo 1 || echo 0) | ||
|
gundersen-lumn marked this conversation as resolved.
gundersen-lumn marked this conversation as resolved.
|
||
|
|
||
| # Idempotent check: don't re-tag if already tagged | ||
| if echo "$COMMIT_MSG" | head -1 | grep -q "^\[AI-ASSISTED\]"; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Auto-tag if any AI signal detected | ||
| if [ "$HAS_COPILOT_COAUTHOR" -gt 0 ] || [ "$HAS_COPILOT_MARKER" -gt 0 ] || [ "$HAS_AI_PATTERN" -gt 0 ]; then | ||
| FIRST_LINE=$(echo "$COMMIT_MSG" | head -1) | ||
| REST=$(echo "$COMMIT_MSG" | tail -n +2) | ||
|
|
||
| # Prepend tag to first line (idempotent: already checked above) | ||
| if [ -z "$REST" ]; then | ||
| echo "[AI-ASSISTED] $FIRST_LINE" > "$COMMIT_MSG_FILE" | ||
| else | ||
| echo "[AI-ASSISTED] $FIRST_LINE" > "$COMMIT_MSG_FILE" | ||
| echo "$REST" >> "$COMMIT_MSG_FILE" | ||
| fi | ||
| fi | ||
|
|
||
| exit 0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.