Skip to content

Commit

Permalink
adding PR request when submitting new project
Browse files Browse the repository at this point in the history
  • Loading branch information
krachwal committed Jul 2, 2024
1 parent bd6be39 commit 2103c8d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/components/ProjectFormPage/ProjectForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,17 @@ const ProjectForm = forwardRef((props, ref) => {
sha: sha,
branch: "new-form-submission"
})
} else {
await octokit.request("PUT /repos/{owner}/{repo}/contents/{path}", {
owner: "gt-ospo",
repo: "open-source-project-explorer",
path: "src/data/project_list.json",
message: "Created project list file and added new project",
content: fileContent,
branch: "new-form-submission"

await octokit.request('POST /repos/{owner}/{repo}/pulls', {
owner: 'gt-ospo',
repo: 'oss-project-explorer',
title: 'Project List Update',
body: 'added new project to list',
head: 'gt-ospo-bot:new-form-submission',
base: 'main',
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
})
}

Expand Down

0 comments on commit 2103c8d

Please sign in to comment.