wordpress-mobile / release-toolkit-gutenberg-mobile

Automation Scripts for Releasing Gutenberg-Mobile Updates to the WordPress Mobile Apps.
Mozilla Public License 2.0
5 stars 2 forks source link

Add Pull Request support to the cli tool #118

Closed jhnstn closed 1 year ago

jhnstn commented 1 year ago

This adds support to manage PRs on Github. It relies on the default api client which pulls the github token from the same config file gh uses. It does not, however, use gh.

Each of the functions only requires a repo name to make a request. It will infer the owner from the supported repos: gutenberg , jetpack, gutenberg-mobile, Wordpress-Android , and WordPress-iOS . Since this tool is not meant a general purpose tool, the github functions will fail it trying to access any other repos.

The orgs for the repos can be changed by using the following env variables : GBM_WORDPRESS_ORG - for access to gutenberg repo GBM_WPMOBILE_ORG - for access to gbm and the main apps GBM_AUTOMATTIC_ORG - for access to jetpack

Testing: Install go if not installed

From the cli directory run go test ./..