Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add automatic POT updates to dev branch #51

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

greatislander
Copy link
Contributor

This PR uses the shivammathur/setup-php action to install WP-CLI, the WP-CLI i18n command, and Pressbooks CLI. It then runs the wp pb make-pot command to generate an updated .pot file for the plugin.

Notes

This action will only run:

  • On the base repository (not on forks)
  • On the dev branch
  • When either .js or .php files have been modified (these are the only sources for localizable strings so the action can be skipped if neither file type has been modified)

Currently, this action does not automatically commit the updated .pot file. Instead, it attaches it as a workflow artifact (see here for an example: https://github.com/greatislander/pressbooks-lti-provider/actions/runs/757127517). These artifacts can be compared to the existing .pot file over the coming weeks, and once the dev team is satisfied with the consistency and accuracy of the results, these instructions can be followed to enable auto-commit and remove the workflow artifact upload step.

@codecov
Copy link

codecov bot commented Apr 16, 2021

Codecov Report

Merging #51 (78241f6) into dev (b0e85b2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##                dev      #51   +/-   ##
=========================================
  Coverage     82.41%   82.41%           
  Complexity      104      104           
=========================================
  Files             3        3           
  Lines           290      290           
=========================================
  Hits            239      239           
  Misses           51       51           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0e85b2...78241f6. Read the comment docs.

Copy link
Contributor

@ho-man-chan ho-man-chan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ho-man-chan ho-man-chan merged commit ed64179 into pressbooks:dev Apr 22, 2021
@greatislander greatislander deleted the automate-pot-generation branch April 22, 2021 13:57
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.

2 participants