Thank you for your interest in contributing to the UGRC website. Before you proceed, briefly go through the following:
Any individual is welcome to contribute to the UGRC website.
The steps below will give you a general idea of how to prepare your local environment for the UGRC website and general steps for getting things done and landing your contribution.
-
Click the fork button in the top right to clone the UGRC website Repository
-
Clone your fork using SSH, GitHub CLI, or HTTPS.
git clone git@github.com:<YOUR_GITHUB_USERNAME>/gis.utah.gov.git # SSH git clone https://github.com/<YOUR_GITHUB_USERNAME>/gis.utah.gov.git # HTTPS gh repo clone <YOUR_GITHUB_USERNAME>/gis.utah.gov # GitHub CLI
-
Change into the gis.utah.gov directory.
cd gis.utah.gov -
Create a remote to keep your fork and local clone up-to-date.
git remote add upstream git@github.com:agrc/gis.utah.gov.git # SSH git remote add upstream https://github.com/agrc/gis.utah.gov.git # HTTPS gh repo sync agrc/gis.utah.gov # GitHub CLI
-
Create a new branch for your work.
git checkout -b name-of-your-branch
-
Run the following to install the dependencies and start a local preview of your work.
pnpm install --frozen-lockfile # installs this project's dependencies pnpm start # starts a preview of your local changes
-
Perform your changes. In case you're unfamiliar with the structure of this repository, we recommend that you review the Collaborator Guide.
-
Perform a rebase to sync your current branch with the upstream branch.
git fetch upstream git rebase upstream/main
-
Run
pnpm formatto confirm that linting and formatting are passing.pnpm format
-
Once you're happy with your changes, add and commit them to your branch, then push the branch to your fork.
cd ~/gis.utah.gov git add . git commit -m "some message" git push -u origin name-of-your-branch
[!IMPORTANT]
Before committing and opening a Pull Request, please go first through our Commit and Pull Request guidelines outlined below. -
Create a Pull Request.
This repository contains several scripts and commands for performing numerous tasks. The most relevant ones are described below.
Commands for Running & Building the Website
pnpm startruns Astro's Local Development Server, listening by default onhttp://localhost:4321/.pnpm buildbuilds the Application on Production mode. The output is by default withindistfolder.- This is used for the Netlify Deployments (Preview & Production)
pnpm previewruns Astro's Local Server pointed at thedistfolder.
Commands for Maintenance Tasks and Tests
pnpm ts-checkruns Astro's typescript check utility to look for any type issues.pnpm formatformats and fixes the whole codebase
This project follows the Conventional Commits specification.
Commits should be signed. You can read more about Commit Signing here.
- Commit messages must include a "type" as described on Conventional Commits
- Commit messages must start with a capital letter
- Commit messages must not end with a period
.
This policy governs how contributions should land within this repository. The lines below state the checks and policies to be followed before merging and in the act of merging.
We recommend a review of our Collaborator Guide for in-depth details on how we accept contributions into this repository. The list below describes some merging and approval rules adopted in this repository.
- At least one approval is required for any PR to be merged.
Each contribution is accepted only if there is no objection to it by a collaborator. During the review, collaborators may request that a specific contributor who is an expert in a particular area give an "LGTM" before the PR can be merged.
If an objection is raised in a pull request by another collaborator, all collaborators involved should try to arrive at a consensus by addressing the concerns through discussion, compromise, or withdrawal of the proposed change(s).
- All required Status-checks must have passed.
- Please make sure that all discussions are resolved.