https://github.com/akinduid/github-administration-automation
This project automates the creation of repositories within different organizations, reducing manual effort and ensuring consistency.
https://github.com/akinduid/github-administration-automation
github github-api
Last synced: 10 months ago
JSON representation
This project automates the creation of repositories within different organizations, reducing manual effort and ensuring consistency.
- Host: GitHub
- URL: https://github.com/akinduid/github-administration-automation
- Owner: AkinduID
- License: mit
- Created: 2025-01-20T08:59:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-17T15:17:40.000Z (10 months ago)
- Last Synced: 2025-03-17T16:30:40.082Z (10 months ago)
- Topics: github, github-api
- Language: Python
- Homepage:
- Size: 66.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Automated GitHub Repository Creator

## Overview
This project automates the creation of GitHub repositories within different organizations, reducing manual effort and ensuring consistency. The following organizations are used for testing:
- `gitopslab`
- `gitopslab-enterprise`
- `gitopslab-extensions`
The application provides a structured workflow for users to submit repository requests and for administrators to review and approve them.
## Features
### User Functionality
- **Dashboard:** View and manage repository requests.
- **Request Form:** Submit a request with repository details and CI/CD configurations.
- **Edit Requests:** Modify existing requests.
- **View Requests:** Check request status and details.
### Admin Functionality
- **Admin Dashboard:** View all repository requests.
- **Approval Workflow:** Approve or reject repository requests with comments.
- **Request Management:** View, comment on, and process repository requests.
### Automation Process
1. **Request Submission:** Users provide necessary details.
2. **Approval Process:** Admins review and approve/reject requests.
3. **Repository Creation:** If approved, the system:
- Retrieves teams from the organization.
- Uses a Fine-Grained Personal Access Token (PAT).
- Creates the repository and configures settings (topics, labels, issue templates, branch protection, etc.).
- Assigns team permissions.
## User Inputs
### General Information
- Email
- Functional Head Email
- Requirement Description
- CC Email List
### Repository Details
- Repository Name
- Organization Name
- Type (Public/Private)
- Description
- Enable Issues (Yes/No)
- Website URL
- Topics
### Security & DevOps
- Team List
- PR Branch Protection (Enabled/Disabled)
- CI/CD Integration: Jenkins, Azure, or Not Applicable
## Technologies Used
- **Backend:** FastAPI (Python)
- **Frontend:** HTML, CSS, JavaScript, Primer CSS Library (Github Theme)
- **Authentication:** Asgardeo
- **API:** Github API, REST API
- **Deplyment:** Docker, Choreo
## Access Requirements
A Fine-Grained Personal Access Token (PAT) with the following permissions:
- **Repository:** Administration (Read & Write), Content (Read & Write), Pull Requests (Read & Write)
- **Organization:** Members (Read Only)
## Setup and Running the Project
1. Clone the repository:
```sh
git clone https://github.com/yourusername/github-administration-automation.git
cd github-administration-automation
```
2. Create a virtual environment and activate it:
```sh
python3 -m venv venv
source venv/bin/activate
```
3. Install the required dependencies:
```sh
pip install -r requirements.txt
```
4. Create a [.env](http://_vscodecontentref_/3) file in the root directory and add the following environment variables:
```env
# Github Personal Access Tokens
gitopslab=github_pat_##
gitopslab-enterprise=github_pat_##
gitopslab-extensions=github_pat_##
GitOpsLab-4=github_pat_##
GitOpsLab-5=github_pat_##
# Email Data
SENDER_EMAIL=example_sender_mail
RECIEVER_EMAIL=example_reciever_mail
SENDER_PASSWORD=#################
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
# Asgardeo Data
CLIENT_ID=#####################
REDIRECT_URI=http://localhost/redirect
TOKEN_URL=https://api.asgardeo.io/t/{your organization}/oauth2/token
AUTHORIZATION_URL=https://api.asgardeo.io/t/{your organization}/oauth2/authorize
LOGOUT_URL=https://api.asgardeo.io/t/{your organization}/oidc/logout
USERINFO_URL=https://api.asgardeo.io/t/{your organization}/oauth2/userinfo
```
5. Run the application:
```sh
uvicorn app.main:app --reload
```
6. Access the application in your browser at `http://localhost:8000`.
## Summary
The **Automated GitHub Repository Creator** simplifies and automates repository creation and management, ensuring efficiency, security, and consistency across teams.