User Tools

Site Tools


evergreen-docs:github-workflow

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
evergreen-docs:github-workflow [2021/05/28 14:22] – fixing my syntax mistake sandbergjaevergreen-docs:github-workflow [2023/12/28 15:54] (current) aneiman
Line 3: Line 3:
 When someone [[evergreen-docs:how-to-contribute-documentation#intermediate_workflow|submits a change via GitHub]], an Evergreen developer should follow these steps to review it: When someone [[evergreen-docs:how-to-contribute-documentation#intermediate_workflow|submits a change via GitHub]], an Evergreen developer should follow these steps to review it:
  
-  Note how many new commits are in the pull request -- you will need this information later. +===== Reviewing the pull request ===== 
-  - If you haven't yet, add the main Evergreen repo (on GitHub) as a remote+ 
 +  [[https://github.com/login|Log in to Github]] 
 +  - Open the pull request in the Github web interface. 
 +  - Open the Files Changed tab 
 +  - Make sure the asciidoc changes look good 
 +  - Open the Checks tab 
 +  - Expand the "Generate Docs Package" step.  Glance for any unexpected warnings or errors. 
 +  - Open the Artifacts menu and select built-docs 
 +  - Unzip the artifact and open it in your browser. 
 +  - Check to make sure that the expected changes look good in the built docs, and that there are no unexpected changes. 
 + 
 + 
 +===== Committing the changes ===== 
 + 
 +If everything looks good: 
 + 
 +  - On the commits tab, note how many new commits are in the pull request -- you will need this information later. 
 +  - In your terminal, if you haven't yet, add the main Evergreen repo (on GitHub) as a remote (make sure you're in the directory you're working on before running command)
     - ''%%git remote add github-evergreen https://github.com/evergreen-library-system/Evergreen.git%%''     - ''%%git remote add github-evergreen https://github.com/evergreen-library-system/Evergreen.git%%''
-  - Update your local master branch to reflect any changes from "origin" +  - Update your local main branch to reflect any changes from "origin" 
-    - ''git checkout master; git fetch origin; git pull origin master''+    - ''git checkout main; git fetch origin; git pull origin main''
   - Fetch the pull request branch into a new local branch   - Fetch the pull request branch into a new local branch
     - ''git fetch github-evergreen pull/[PULL_REQ_NUMBER]/head:[BRANCHNAME]''     - ''git fetch github-evergreen pull/[PULL_REQ_NUMBER]/head:[BRANCHNAME]''
-  - Cherry pick the relevant commits into your local copy of the master branch. +  - Cherry pick the relevant commits into your local copy of the main branch. 
-    - ''git cherry-pick -s [BRANCHNAME]~[Number of commits]..[BRANCHNAME]'' (for example, if you are bringing in two commits from the survey-docs branch, run ''git cherry-pick survey-docs~2..survey-docs)'' +    - If only one commit: ''git cherry-pick -s [BRANCHNAME]'' 
-  Test build the changed AsciiDoc file + the nav.adoc file(s) that include it +    - If more than one: ''%%git cherry-pick -s [BRANCHNAME]~[Number of commits]..[BRANCHNAME] --edit%%'' (for example, if you are bringing in two commits from the survey-docs branch, run ''%%git cherry-pick survey-docs~2..survey-docs) --edit%%'' 
-    - ''perl ./generate_docs.pl --base-url http://examplesite.org/prod'' +      The ''%%--edit%%'' flag will permit you to edit all commit messages as they come in. 
-    - Check to see if there are any images posted to the Github conversation that have not been committed yet.  Add those to ''Evergreen/docs/modules/<module_name>/assets/images/media/'' +  - If you need to squash commits: 
-    - Also look for other AsciiDoc warnings or errors+    - From your local branch, enter ''git rebase -i HEAD~2'' (where 2 is the number of commits you wish to combine)     
 +    Your text editor will open and should show both of the commits, for example: 
 +      - ''pick [COMMIT HASH 1] [COMMIT MESSAGE 1]'' 
 +      - ''pick [COMMIT HASH 2] [COMMIT MESSAGE 2]'' 
 +    - Change the word ''pick'' in the second line to ''fixup'' then save and close the file. This merges the commits and retains the first line's commit message. 
 +    - Check gitlog to ensure that you now have a single commit
   - Make any corrections (via additional commits, if needed)   - Make any corrections (via additional commits, if needed)
   - Use ''git log'' to make sure everything looks good.   - Use ''git log'' to make sure everything looks good.
Line 22: Line 44:
         - Example: "Resolves LP#1234567"         - Example: "Resolves LP#1234567"
     - (If the GitHub author does not match the author's identity in git.evergreen-ils.org, consider fixing it with ''%%git commit --amend --author="NAME <email>"%%'')     - (If the GitHub author does not match the author's identity in git.evergreen-ils.org, consider fixing it with ''%%git commit --amend --author="NAME <email>"%%'')
-  - When you are confident your local master branch is ready: ''git push origin master''+  - When you are confident your local main branch is ready: ''git push origin main''
   - Backport to previous EG versions as appropriate   - Backport to previous EG versions as appropriate
-    - ''git checkout rel_3_8'' +    - ''git checkout rel_3_8'' (where rel_3_8 is the branch for previous version) 
-    - ''git cherry-pick master~[Number of commits]..master'' +    - ''git pull'' (to get the most up-to-date version of the branch) 
-  Email docs list and/or pull requester to say it is done (or with other feedback) +    - If one commit: ''git cherry-pick main'' 
-  - Close pull request on GitHub+    - If more than one: ''git cherry-pick main~[Number of commits]..main'' 
 +    ''git push'' 
 +  - Go back to the pull request on Github's site.  Comment on the pull request to thank the contributor, then close the pull request.
evergreen-docs/github-workflow.1622226127.txt.gz · Last modified: 2022/02/10 13:34 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.