Skip to content

Commit ecc7a78

Browse files
committed
create PR parse object
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
1 parent 107c445 commit ecc7a78

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
<textarea class="form-control" rows="10" id="json-result" readonly></textarea>
5858
<button type="button" class="btn btn-outline" href="#" onclick="copyToClipboard(event)">Copy</button>
5959
<button type="button" class="btn btn-outline" href="#" onclick="downloadFile(event)">Download</button>
60+
<button type="button" class="btn btn-outline" href="#" onclick="createProjectPR(event)">Create Pull Request</button>
6061
</div>
6162
</body>
6263
</html>

js/formDataToJson.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ async function copyToClipboard(event){
9191
document.execCommand("copy")
9292
}
9393

94+
// Creates PR on requested project
95+
async function createProjectPR(event){
96+
event.preventDefault();
97+
98+
var textArea = document.getElementById("json-result");
99+
var codeJSONObj = textArea.value.parse()
100+
console.log(codeJSONObj)
101+
}
102+
94103
// Triggers local file download
95104
async function downloadFile(event) {
96105
event.preventDefault();

js/generateFormComponents.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,6 @@ async function createFormComponents() {
305305
"input": true
306306
});
307307

308-
components.push({
309-
"label": "Git URL (optional)",
310-
"disableSortingAndFiltering": false,
311-
"tableView": true,
312-
"key": "textField",
313-
"type": "textfield",
314-
"input": true
315-
});
316-
317308
// Add submit button to form
318309
components.push({
319310
type: "button",

0 commit comments

Comments
 (0)