Skip to content

Contributing

Trevor Rife edited this page Jul 21, 2023 · 6 revisions

Overview

Field Book follows a trunk-based development model. A short-lived branch is created for an individual feature or bugfix. These branches are based off of the main branch, and are merged back in and deleted in a timely fashion. Members of the PhenoApps GitHub Organization may create branches within the Field-Book repository that correspond to an assigned issue with a short, descriptive name that excludes special characters. Contributors from outside the organization should fork the Field-Book repo and work off of branches in their fork while ensuring they regularly sync their fork with Field-Book:main.

Pull Requests

Once a feature or bugfix has been implemented in a branch, the branch can be used to generate a pull request (PR) back to main, or Field-Book:main. When opening a PR, GitHub will prompt you to supply a PR title and fill out Field Book's PR template. The title should be a single sentence describing the contents of the PR, it can be identical to the release note that should also be added at the end of the template body. A longer description can be added at the top of the template body, including references to related issues that are being addressed or closed. Finally the type of change should be indicated in the first checklist, and all self-review and documentation steps should be indicated in the second checklist.

Code Review and Merging

Once a PR has been created, Field-Book's PR workflow will trigger and automatically build both the user documentation and a signed APK. If either build fails the PR will remain ineligible for merge until the builds are fixed. If successful, the signed apk can be used for viewing and testing the new feature or bugfix.

Automated Workflows

Field Book has a set of workflows used to automate the building and releasing of apks. They are automatically triggered on pull requests to the main branch (do-pr-prerelease), pushes to the main branch (do-github-release), and branch deletion (do-artifacts-cleanup).

Fieldbook-git-actions drawio

Clone this wiki locally