iandees / wof-editor

A simple Who's on First editor.
https://writefield.nextzen.org/
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Github integration #18

Closed nvkelso closed 4 years ago

nvkelso commented 4 years ago
iandees commented 4 years ago

With 282dbe2 I'm able to create pull request (and a fork if one doesn't already exist) that adds a file. Right now it's pointed at someone's test repository, creating a new file instead of modifying an existing one.

Next steps for this:

iandees commented 4 years ago

The deployed app will now determine the GitHub repo to use based on the wof:repo_name property or build the repo name based on wof:placetype and wof:country.

Once it finds a repo name, it will try to make a branch in that repo. If it can't make a branch in that repo because you aren't a contributor, it will create a fork and create the branch there.

Once the branch is created, it will update the file on that branch with a single commit.

Once the commit is made to that branch, it will open a pull request that merges the branch into master on the WOF repo.

Assuming all that is successful, it will redirect the user to that created pull request after clicking the "Propose changes" button on the WOF editor.

nvkelso commented 4 years ago

Propose changes, nice :)

Might be worth some helper text on the button or note below the button?

iandees commented 4 years ago

I added a new button that lets you export the changes without making a PR and some help text below the buttons:

image

nvkelso commented 4 years ago

Both of these work for me now, huzzah!

(I'll followup with minor problems in new issues.)