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

Update script to improve payload creation and response handling (create_repo.sh) #50

Open
anupammaurya6767 opened this issue May 23, 2023 · 2 comments
Assignees
Labels
gssoc23 Issues created for GSSoC 23 contributors level2

Comments

@anupammaurya6767
Copy link

Description:
I propose the following updates to the existing script to enhance the payload creation and improve the handling of API responses when creating a GitHub repository.

Changes:

  1. Instead of directly creating the payload using cat, we're now using jq to construct a JSON object with the necessary fields. This ensures the proper handling of special characters and prevents potential issues.

  2. Removed the private and auto_init fields from the payload creation since you set them to false by default.

  3. Utilized jq to parse the response from GitHub and extract the relevant information for error handling and success messages.

Benefits:

  1. The updated payload creation using jq ensures proper handling of special characters and prevents issues that may arise when using cat directly.
  2. The use of jq to parse the response allows for more accurate error handling and success messages, providing better feedback during the repository creation process.
@anupammaurya6767
Copy link
Author

@sahil-sagwekar2652 I am a GSSOC contributor
I want to work on this issue
Please assign it to me

@sahil-sagwekar2652
Copy link
Owner

The create_repo.sh script should also initialize the local repository along with the remote one. Currently, it only does the latter part. Please see if you can implement this feature so that it works similarly to how create_repo.py works.

@sahil-sagwekar2652 sahil-sagwekar2652 added gssoc23 Issues created for GSSoC 23 contributors level2 labels May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc23 Issues created for GSSoC 23 contributors level2
Projects
None yet
Development

No branches or pull requests

2 participants