Skip to content

feat: auto-accept GitHub invitation after dataset creation - #49

Merged
neuromechanist merged 2 commits into
devfrom
feature/auto-accept-invitation
Jan 21, 2026
Merged

neuromechanist merged 2 commits into
devfrom
feature/auto-accept-invitation

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Auto-accept GitHub repository invitation after dataset creation, removing the need for users to manually accept in their browser.

Changes

  • src/lib/datalad.ts: Add acceptGitHubInvitation() function
  • src/commands/dataset.ts: Integrate invitation acceptance after dataset creation
  • src/commands/sandbox.ts: Integrate invitation acceptance after sandbox creation

How it works

  1. After the API creates a dataset and invites the user as collaborator
  2. CLI calls gh api /user/repository_invitations to find the pending invitation
  3. CLI accepts the invitation via gh api --method PATCH /user/repository_invitations/{id}
  4. If already a collaborator, succeeds silently
  5. If acceptance fails, warns user with manual acceptance link

Testing

  • Build passes
  • Lint passes
  • Test with new dataset creation (requires API call)

Related Issues

Closes #43
Part of #41

- Add acceptGitHubInvitation() function to find and accept pending invitations
- Integrate into dataset upload and sandbox flows
- Gracefully handle already-collaborator and manual-accept fallback cases

Closes #43
@github-actions

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR49

Version: 0.3.4-PR49.c48a905
Commit: c48a905


🤖 Updated on each push.

- Fix jq injection vulnerability by filtering in JavaScript instead
- Fail explicitly on invalid GitHub URL instead of silently continuing
- Add rate limit error handling
- Use stricter regex for GitHub username/repo validation
@neuromechanist
neuromechanist merged commit 62c633d into dev Jan 21, 2026
@neuromechanist
neuromechanist deleted the feature/auto-accept-invitation branch January 21, 2026 00:58
@neuromechanist neuromechanist linked an issue Jan 21, 2026 that may be closed by this pull request
@neuromechanist neuromechanist mentioned this pull request Sep 29, 2026
4 of 16 tasks

This branch was previously deployed

1 inactive deployment
npm — 92854660 Deployed Jan 21, 2026 by neuromechanist
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.

Auto-accept GitHub invitation after dataset creation

1 participant