Add Button and Functionality to Automatically Create a PR adding code.json to Project#40
Add Button and Functionality to Automatically Create a PR adding code.json to Project#40IsaacMilarky merged 16 commits intomainfrom
Conversation
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
… file to that branch, and then create a PR into that project Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
|
Link to example PR created: |
added debug flag to see what's going on
|
@IsaacMilarky im having trouble getting the feature to work but im not sure if im doing the steps wrong. I have to enter in the code.json information, then generate the code.json, then enter the API key, then click send PR correct? |
I think you have to put in the API key info before generating the code.json. I can fix that though since it seems kind of confusing. |
natalialuzuriaga
left a comment
There was a problem hiding this comment.
Amazing amazing job, I was able to get this working on my end 🥳natalialuzuriaga/test-repo#1
A couple of comments addressing error handling and improvements we can make to the user experience of the form. Otherwise, logic makes sense to me and it's working!
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
natalialuzuriaga
left a comment
There was a problem hiding this comment.
Did more testing on error handling and found an issue, otherwise this is almost ready to ship!
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
natalialuzuriaga
left a comment
There was a problem hiding this comment.
Did testing with different token permissions and error handling works properly. After adding that last alert, this should be good to go and ready to merge!
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Add Button and Functionality to Automatically Create a PR adding code.json to Project
Problem
Currently, the user has to manually add the generated code.json text to the project either with a direct commit or by PR to the desired project.
Solution
Use the GitHub API to add the file via REST requests using Javascript fetch logic.
Result
Summary
Test Plan
This is tricky to test tbh. I will probably create my own test repo to test all of this to make sure that it is ready for merge.