vaakash / git-it-write

A WordPress plugin to publish markdown files present in a Github repository as posts to WordPress automatically.
https://www.aakashweb.com/wordpress-plugins/git-it-write/
GNU General Public License v3.0
45 stars 22 forks source link

Fix webhook image upload for public and private repositories #21

Closed lukaszpiotrluczak closed 1 year ago

lukaszpiotrluczak commented 1 year ago

This Pull Request will fix two issues:

1) For webhooks when trying to upload image the process was interrupted. That was because we were missing loading proper files from WordPress. I have added proper require_once at webhook.php

2) For private repositories it was not possible to upload images. This was because we were using media_sideload_image function which was not capable of downloaing from private repo.

Fixes #20 Fixes #14 Fixes #9 Fixes #8 Closes #7

@vaakash I don't know how is the contribution flow in this project. If I done something wrong please tell me and I will do better.

vaakash commented 1 year ago

Hi @lukaszpiotrluczak, thanks for the changes! I'll review, test and merge them in a couple of days.

lukaszpiotrluczak commented 1 year ago

Thank you @vaakash . I will be gratefull.

I have some ideas for next changes also

lukaszpiotrluczak commented 1 year ago

Hi @vaakash!

I don't want to rush :)

Have you had a chance to look?

I have ideas for further changes and expansion, can I contact you somehow?

vaakash commented 1 year ago

Hi @lukaszpiotrluczak, sorry for the delay. I just started on this yesterday with testdata prepartion. Got caught up with other works. I'll merge this request by this weekend or before.

Sure please contact me via email: aakash [dot] 19493 [at] gmail.com or contact form: https://www.aakashweb.com/contact/

vaakash commented 1 year ago

PR has been accepted. There are some minor changes needed like removing comments and renaming the function. I'll include these changes going further.

lukaszpiotrluczak commented 1 year ago

Thank you.