A modern web application that helps manage GitHub repository invitations by removing stale invitations and sending fresh ones. Perfect for educational institutions managing student access to course repositories.
- Organization Management: Support for multiple GitHub organizations with customizable assignment mappings
- Automatic Repository Naming: Generates repository names based on assignment type and username
- Dry Run Mode: Test operations without making actual changes
- Modern UI: Beautiful, responsive interface with burgundy and black theme
- Real-time Feedback: Live preview of generated repository names
- Permission Management: Support for all GitHub permission levels (pull, triage, push, maintain, admin)
- Educational Institutions: Manage student access to course repositories
- Team Management: Handle repository invitations for team members
- Open Source Projects: Manage contributor access efficiently
- Corporate Training: Organize repository access for training programs
- Frontend: Next.js 14 with App Router
- Language: TypeScript
- Styling: Inline CSS with modern design patterns
- API: GitHub REST API via Octokit
- Deployment: Vercel ready
- Node.js 18+
- npm, yarn, pnpm, or bun
- GitHub Personal Access Token with repository administration privileges
git clone https://github.com/your-username/github-reinvite.git
cd github-reinvitenpm install # or yarn install # or pnpm install
Create a .env.local file in the root directory:
# Required: GitHub Personal Access Token GITHUB_TOKEN=your_github_personal_access_token_here # Optional: Default GitHub organization NEXT_PUBLIC_DEFAULT_GITHUB_OWNER=your_default_org
Edit src/app/config/organizations.ts to customize your organizations and assignments:
export const ORGANIZATIONS = { "YOUR-ORG-Fall25": { name: "Your Organization Fall25", owner: "your-github-org", // GitHub organization/owner name assignments: { "Assignment-1": "assignment-1-prefix-", "Assignment-2": "assignment-2-prefix-", // Add more assignments as needed } } } as const;
npm run dev # or yarn dev # or pnpm dev
Open http://localhost:3000 to see the application.
- Go to GitHub Settings ā Developer settings ā Personal access tokens
- Generate a new token with the following scopes:
repo(Full control of private repositories)admin:org(Full control of orgs and teams)
- Copy the token and add it to your
.env.localfile
The application supports multiple organizations with different assignment mappings:
- Organization Name: Display name shown in the UI
- Owner: Actual GitHub organization/username
- Assignments: Key-value pairs mapping assignment names to repository prefixes
- Select Organization: Choose from available organizations
- Pick Assignment: Select the assignment type
- Enter Username: Provide the GitHub username
- Choose Permission: Select the appropriate permission level
- Test (Optional): Enable dry run mode to simulate the operation
- Execute: Click "Re-invite" to process the invitation
src/
āāā app/
ā āāā api/
ā ā āāā reinvite/
ā ā āāā route.ts # API endpoint for GitHub operations
ā āāā config/
ā ā āāā organizations.ts # Organization and assignment configuration
ā āāā globals.css # Global styles
ā āāā layout.tsx # Root layout component
ā āāā page.tsx # Main application component
āāā public/ # Static assets
āāā ... # Configuration files
Processes GitHub repository invitation management.
Request Body:
{
"owner": "github-org-name",
"repo": "repository-name",
"username": "github-username",
"permission": "admin|maintain|push|triage|pull",
"dryRun": false
}Response:
{
"ok": true,
"dryRun": false,
"input": { /* request data */ },
"foundInvitations": [ /* existing invitations */ ],
"deletedInvitations": [ /* deleted invitations */ ],
"invite": { /* invitation result */ }
}- Connect Repository: Go to Vercel and connect your GitHub repository
- Configure Environment Variables: Add the following in your Vercel project settings:
GITHUB_TOKEN: Your GitHub Personal Access TokenNEXT_PUBLIC_DEFAULT_GITHUB_OWNER: Your default GitHub organization
- Deploy: Vercel will automatically deploy on every push to your main branch
- Netlify: Connect your GitHub repo and add environment variables
- Railway: Deploy with automatic GitHub integration
- Fly.io: Use
flyctl launchandflyctl deploycommands
For Vercel deployment, add these in your project settings:
GITHUB_TOKEN=your_production_github_token NEXT_PUBLIC_DEFAULT_GITHUB_OWNER=your_default_org
Vercel Setup Tips:
- Environment variables are automatically available in production
- No need to create a
.env.localfile for Vercel deployment - Changes to environment variables require a new deployment
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow TypeScript best practices
- Maintain consistent code formatting
- Add appropriate error handling
- Update documentation for new features
- Test thoroughly before submitting
This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
You are free to:
- Share ā copy and redistribute the material in any medium or format
- Adapt ā remix, transform, and build upon the material
Under the following terms:
- Attribution ā You must give appropriate credit, provide a link to the license, and indicate if changes were made
- NonCommercial ā You may not use the material for commercial purposes
- ShareAlike ā If you remix, transform, or build upon the material, you must distribute your contributions under the same license
Yahya Gilany
- Website: yahyagilany.io
- GitHub: @ygilany
If you find this project helpful, consider supporting its development:
- GitHub for providing the excellent REST API
- Next.js team for the amazing framework
- Creative Commons for the licensing framework
- All contributors and users who help improve this tool
- š Bug Reports: Open an issue
- š” Feature Requests: Start a discussion
- š§ Contact: yahyagilany.io
Made with ā¤ļø for the developer community