Skip to content

[Fix] Triggering deploys from WordPress mobile apps#2

Merged
nfmohit merged 1 commit intomasterfrom
fix/deploy-from-mobile-apps
Mar 11, 2020
Merged

[Fix] Triggering deploys from WordPress mobile apps#2
nfmohit merged 1 commit intomasterfrom
fix/deploy-from-mobile-apps

Conversation

@nfmohit
Copy link
Copy Markdown
Collaborator

@nfmohit nfmohit commented Jan 17, 2020

Description

This PR fixes #1 where @sahandnayebaziz reported that edits from WordPress mobile apps were not being triggered.

Cause

Before the deploy trigger action was fired with the save_post hook, we're currently doing a user role check to make sure the current user is an admin. For some reason, that user check is failing on the mobile apps (we're exactly not sure why as I don't have much knowledge about the WordPress mobile apps and the XML-RPC API).

Solution

Upon further considerations, we realized that the user role check is not really necessary here as users without the admin role can also publish/edit posts (e.g. editor, author). As a result, we've removed the user role check in this and according to my tests and of @sahandnayebaziz, triggers from the mobile apps are now working.

⭐️Special props to @sahandnayebaziz for reporting this issue and for testing the solution.

@nfmohit nfmohit added this to the v1.1 milestone Jan 17, 2020
@zekecato
Copy link
Copy Markdown

Hello,

Do you have a timeline for merging this into the main branch and having this update in the Wordpress app directory? I think it's a fix for my issue and I'm wondering if I could update my plugin through the normal channel soon, or if I should just download this branch now.

@nfmohit nfmohit merged commit 6fad2a7 into master Mar 11, 2020
@nfmohit nfmohit removed this from the v1.1 milestone Mar 11, 2020
@nfmohit nfmohit deleted the fix/deploy-from-mobile-apps branch March 11, 2020 05:17
@nfmohit
Copy link
Copy Markdown
Collaborator Author

nfmohit commented Mar 11, 2020

Hey there @zekecato !
I hope you are doing well today!

I just released an update to the plugin which contains the fix. I apologize for the time I took in order to merge this, I had plans to work on some more features of the plugin and then update altogether, but couldn't make time to do so. I didn't realize other users were encountering this as well so I updated as soon as I saw your comment.

Please let me know if this fixes your issue. If in case it doesn't, feel free to create an issue and I'll be happy to look into it.

Hope this helps.

Kind regards,
Nahid

@zekecato
Copy link
Copy Markdown

Thanks, Nahid!

This did fix my issue. It was just the case of needing non-admin users to be able to trigger builds. I appreciate this clean and simple plugin.

Happy trails,
Zeke

@nfmohit
Copy link
Copy Markdown
Collaborator Author

nfmohit commented Mar 11, 2020

Hi, @zekecato !
I hope you're doing well today!

I'm glad that resolved your issue.

Also, I’m very happy to hear that this plugin was useful to you, thank you for the kind words! I’d really appreciate it if you could share your feedback regarding the plugin in the form of a review so that it can help other users seeking a similar solution.

Thank you very much!

Kind regards,
Nahid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic Deployment When Working from WordPress iOS

2 participants