-
Notifications
You must be signed in to change notification settings - Fork 0
feat: NEXUS — platform integration milestone #201
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
21 commits
Select commit
Hold shift + click to select a range
49177ba
feat(export): add git mind export command (NEX-006)
4a52bf0
feat(frontmatter): import from markdown frontmatter (NEX-003)
3c79244
feat(remote): cross-repo edge protocol (NEX-004)
eae5050
feat(merge): multi-repo graph merge (NEX-005)
21988aa
feat(action): GitHub Action for PR suggestions (NEX-001)
d660153
feat(format-pr): PR review commands and display (NEX-002)
4a01ab5
chore: bump version to 2.0.0-alpha.3 for NEXUS release
c7e6fea
fix: address PR #201 review feedback (#195, #196, #197, #198, #199, #…
eaea22c
fix: address PR #201 round-2 review feedback (#195, #196, #197, #198,…
eba0277
fix(format-pr): escape backslashes before pipes in table cells (#200)
c0b0cac
fix: address PR #201 round-3 review feedback (#196, #197, #200)
b9681ec
feat(epoch): implement time-travel via epoch markers (#202)
8fe6a7b
fix(epoch): prevent shell injection in git commands (#202)
7ea6a56
fix(action): add contents:read permission to review workflow (#200)
5a1db26
fix(action): respect workflow-level GITMIND_AGENT env var (#199)
7fd1672
fix(format-pr): reject index 0 and strip backticks in table (#200)
f0f89d4
fix(frontmatter): narrow error catch and fix extension stripping (#196)
791218b
fix(remote): clear error for non-prefixed IDs in qualifyNodeId (#197)
22ebfce
chore: add v2.0.0-alpha.4 changelog for epoch + review fixes (#202)
0baf756
fix: address round-4 review nitpicks (#201, #202)
0ff3d63
fix: address round-5 review feedback (#195, #196, #197, #200, #202)
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,8 @@ | ||
| # git-mind configuration for GitHub Actions | ||
| # Copy to .github/git-mind.yml and customize | ||
|
|
||
| suggest: | ||
| # Agent command for generating suggestions. | ||
| # Must accept prompt on stdin and output JSON on stdout. | ||
| # Example using Claude: | ||
| agent: "claude -p --output-format json" |
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,100 @@ | ||
| name: git-mind Review Commands | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
|
|
||
| jobs: | ||
| handle-command: | ||
| if: > | ||
| github.event.issue.pull_request && | ||
| contains(github.event.comment.body, '/gitmind') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| # Checkout default branch (trusted code) — never the PR head. | ||
| # issue_comment is a privileged context; checking out attacker-controlled | ||
| # code would allow arbitrary execution with write permissions. | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Check commenter permissions | ||
| id: authz | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| COMMENTER: ${{ github.event.comment.user.login }} | ||
| REPO: ${{ github.repository }} | ||
| run: | | ||
| PERMISSION=$(gh api "repos/${REPO}/collaborators/${COMMENTER}/permission" --jq '.permission') | ||
| if [[ "$PERMISSION" != "admin" && "$PERMISSION" != "write" && "$PERMISSION" != "maintain" ]]; then | ||
| echo "User ${COMMENTER} does not have write access. Skipping." | ||
| echo "authorized=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "authorized=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Setup Node.js | ||
| if: steps.authz.outputs.authorized == 'true' | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - name: Install dependencies | ||
| if: steps.authz.outputs.authorized == 'true' | ||
| run: npm ci | ||
|
|
||
| - name: Parse and execute command | ||
|
||
| if: steps.authz.outputs.authorized == 'true' | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| COMMENT_BODY: ${{ github.event.comment.body }} | ||
| PR_NUMBER: ${{ github.event.issue.number }} | ||
| REPO: ${{ github.repository }} | ||
| run: | | ||
| # Extract command from comment | ||
| COMMAND=$(printf '%s' "$COMMENT_BODY" | grep -oP '/gitmind\s+\K(accept-all|accept\s+\d+|reject\s+\d+)' || true) | ||
|
|
||
| if [ -z "$COMMAND" ]; then | ||
| echo "No valid /gitmind command found" | ||
| exit 0 | ||
| fi | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ACTION=$(echo "$COMMAND" | awk '{print $1}') | ||
| INDEX=$(echo "$COMMAND" | awk '{print $2}') | ||
|
|
||
| case "$ACTION" in | ||
| accept-all) | ||
| if node bin/git-mind.js review --batch accept --json; then | ||
| REPLY="All pending suggestions accepted." | ||
| else | ||
| REPLY="Failed to accept suggestions." | ||
| fi | ||
| ;; | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| accept) | ||
| if [ -z "$INDEX" ] || ! [[ "$INDEX" =~ ^[0-9]+$ ]]; then | ||
| REPLY="Invalid index. Usage: \`/gitmind accept <number>\`" | ||
| elif node bin/git-mind.js review --batch accept --index "$INDEX" --json; then | ||
| REPLY="Suggestion $INDEX accepted." | ||
| else | ||
| REPLY="Failed to accept suggestion $INDEX." | ||
| fi | ||
| ;; | ||
| reject) | ||
| if [ -z "$INDEX" ] || ! [[ "$INDEX" =~ ^[0-9]+$ ]]; then | ||
| REPLY="Invalid index. Usage: \`/gitmind reject <number>\`" | ||
| elif node bin/git-mind.js review --batch reject --index "$INDEX" --json; then | ||
| REPLY="Suggestion $INDEX rejected." | ||
| else | ||
| REPLY="Failed to reject suggestion $INDEX." | ||
| fi | ||
| ;; | ||
| esac | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| if [ -n "$REPLY" ]; then | ||
| gh api "repos/${REPO}/issues/${PR_NUMBER}/comments" \ | ||
| -f body="**git-mind:** $REPLY" | ||
| fi | ||
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
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.
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.
contents: readmay be insufficient if graph mutations need to persist.The
accept/reject/accept-allcommands write to the graph (via git notes), but the workflow never pushes those changes back to the remote. This means the operations are effectively lost after the workflow run completes.If graph mutations should persist, you need:
contents: writepermissiongit pushstep after the CLI commandIf the workflow is only meant to acknowledge the command via a comment reply (and the actual mutation happens elsewhere), this is fine as-is but the CLI invocations are unnecessary overhead.
🤖 Prompt for AI Agents