GSoC 2022 Proposal - Adding creategitrepo Command

Hello, I’m Hazem, a 4th-year computer science student. I’m passionate about writing code, building software, and automating stuff.

This year I contributed to many open-source projects through the GSSoC program an Indian version of the GSoC program. I was very happy when I got the first LGTM, so I was excited to participate in the GSoC program.

When a developer starts to build a new project he mostly starts with initializing a local git repo and creating a remote GitHub repo then connecting the local repo with the remote repo. I want to automate this procedure and integrate it into the Django commands system to allow the Django developers to start directly developing their applications without doing these repetitive procedures.

The workflow should be like this:-

$ mkdir demoproj
$ cd demoproj
$ django-admin startproject core .
$ python manage.py creategitrepo
> Github repo name [demoproj]: my-proj-repo
> Is it a public repo (yes/no) [yes]:
> Init commit msg [init commit]:

I already made a prototype script to automate this. you can download it and try it locally from here.

What should I do is:

  • Reimplement the code to be cleaner.
  • Add more options like:
    • Committing and pushing the starter code.
    • Adding a .gitignore file that includes the suitable files.
  • Use the GitHub API directly instead of using the third-party package (PyGitHub).
  • Integrate the feature into the Django commands system.
  • Write unit testing to cover the possible usage scenarios.
  • Document the feature.

Hi @hazemessam — Thanks for the post.

TBH I don’t think this would be a good fit for Django itself. git init is easy enough to type, and we’re unlikely to bundle an integration with a particular VCS hosting provider.

Maybe it’s something that would be accepted for Django-Extensions or it could well live as its own third-party tool but I’d first look at the gh cli tool which already provides a Repo Create command.

1 Like