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-reinvite
npm 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.local
file
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 launch
andflyctl deploy
commands
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.local
file 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