Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 2.26 KB

merging-content-prs.md

File metadata and controls

60 lines (41 loc) · 2.26 KB

Merging a pull request from the Content Team

Introduction

Members of the Content Team do not have permission to contribute directly to the canonical repository, so when they want to make a change, they create a pull request using a fork of the repository. Also since they don't usually have a Ruby environment setup on their local machine, they will not be able to update files relating to the regression tests e.g. file checksums, Govspeak artefacts, etc. See documentation about adding regression tests for more information.

Instructions

  1. Check out the branch from the forked repo onto your local machine. Note that <github-username> refers to the owner
$ git remote add <owner-of-forked-repo> [email protected]:<owner-of-forked-repo>/smart-answers.git
$ git fetch <owner-of-forked-repo>
$ git co -b <branch-on-local-repo> <owner-of-forked-repo>/<branch-on-forked-repo>
  1. Review the changes in the commit(s)
  2. Remove any trailing whitespace
  3. Run the following command to regenerate the Govspeak artefacts (in test/artefacts/<smart-answer-flow-name>) for the regression tests:
$ RUN_REGRESSION_TESTS=<smart-answer-flow-name> ruby test/regression/smart_answers_regression_test.rb
  1. Review the changes to the Govspeak artefacts to check they are as expected
  2. Run the following command to update the checksums for the smart answer:
$ rake checksums:update[<smart-answer-flow-name>]

For more information, see the checksums documentation.

  1. Run the main test suite
$ rake
  1. Stage the changed files & add a new commit or amend the commit
$ git add .
$ git commit # ok to amend commit if only one commit in PR
  1. Run the regression test for the smart answer (now that Govspeak artefacts & file checksums have been updated)
$ RUN_REGRESSION_TESTS=<smart-answer-flow-name> ruby test/regression/smart_answers_regression_test.rb
  1. Push the branch to GitHub and submit a new pull request so that people have a chance to review the changes and a Continuous Integration build is triggered. Close the original pull request.
$ git push origin <branch-on-local-repo>

See documentation on regression tests for further details.