Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5697 create/migrate repo using comandline #7611

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matiasurbieta
Copy link

Describe the pull request

Adds support to command line creation of repository. This is useful for user and repos creation in bulk.
Link to the issue: #5697

Checklist

  • [ x] I agree to follow the Code of Conduct by submitting this pull request.
  • [ x] I have read and acknowledge the Contributing guide.
  • [ x] I have added test cases to cover the new code or have provided the test plan.

Test plan

  • Make sure a user is available in database. If not, use:

./gogs admin create-user --name=user3 --password=mypassword --email=user3@user.com --admin=false

  • Run the following sentence in command line:
    ./gogs admin create-repository --username=user3 --repository_name=repo

Expected to get the repository created.

  • Re-run the repository creation and should get a duplication error.
  • Run the repository creation for an invalid user and must get an error No user was found with ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants