Creating A New Github Repo Using GitHub API

I am wanting to create a discord bot that will allow users to setup a “profile”. The throught process is as follows

1) >create profile
2) what is your discord name? (example#0000)
3) what is your discord ID? (465416516813584)
4) what is your email? (
***in the background***
1A) saves all 3 information types to a database under that users discord ID
2A) generates a random password for repo
3A) creates repo with users email
4A) creates text channel under repo category with users name as channel name
5A) obtains webhook information from newly created repo
6A) creates webhook with webhook information that is connected to text channel with as the name as in number 2A)
7A) sends a confirmation message that tags the user in the newly created text channel that the profile has been created, and registered to the database. confirmation that the repository has been created, and gives them the direct link to the repo, and a temporary password that was generated so that they can go in and change their password, and setup their repo.

To sum up what I’m wanting to do is when the member types the command to make a profile, it will also create them a github repo (with a temp password) using their email, then it will create a new text channel under a given category in the discord allowing the bot to then create a webhook with that newly created text channel that is connected to the repo so that as we team members do commits to our repo’s, it sends a notification to the discord channel. I know how to do all of this manually by going to GitHubs Website but I would like to have it all done in a command. The main thing I’m curious about is if it’s possible. If so, where would be a good place to start with the GitHub API?

:wave: Welcome!

Are you trying to create GitHub accounts using the API? If so, we don’t permit the automated creation of GitHub accounts in our Terms of Service.

If that’s not what you meant, please let me know!

Thank you for letting me know :slight_smile: The purpose is that my partner and I are starting a company, and I happened to think about utilizing discord as a work chat platform would be a bit more beneficial, and I was trying to think of a way to be able to create repo’s for employees that are controlled, permissions wise, by the company, and I figured it would be easier for when they join the discord (new employee) it will create them a blank, empty repo with a temporary password so they can in and change their password to whatever they like, but all they would be able to do is change their password, and post commits to their repo’s. Would it be better if I just created forks off the main branch?

It sounds like you simply need employees to create their own GitHub accounts, which they control.

You can create an organisation and invite your employees into that organisation. They would still control their own account, but you can control what permissions they have in your organisation.

Ok cool! That sounds about like what I’m after. I can just setup the bot to auto send the link to the organization, and they can follow the link, and join it. Thank you so much for your help!