# Contribution Guidelines

Thank you for your interest in contributing to this project. Please review the following guidelines before submitting your work.

We are going to use [Github Flow](https://githubflow.github.io/) from @[August 26](mention://eba98f6e-fe3f-4150-a237-238d25d27a22/date/2026-08-26) on.

## **How We Do It**

So, what is GitHub Flow?

* To work on something new, create a descriptively named branch off of `master` (ie: `add-foops-assessment`)
* After someone else has reviewed and signed off on the feature, you can merge it into master
* Commit to that branch locally and regularly push your work to the same named branch on the server
* When you need feedback or help, or you think the branch is ready for merging, open a [pull request](http://help.github.com/send-pull-requests/)
* Once it is merged and pushed to 'master', you can and *should* deploy immediately
* Anything in the `master` branch is deployable

 ![](https://wiki.agroportal.eu/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzLzVmNTFjMmUyLTZlMDMtNGQzZS04ZWNiLTE2NzJkYTcxN2ZmYi8yZTJiNmQyZC02ZWUxLTQ3YWQtOTU4MS1jNDRiZTlkMzgwYWIvbWVybWFpZC1kaWFncmFtLTIwMjYtMDgtMjYtMTE0OTMyLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzkzODk0NDAwLCJleHAiOjE3OTM5ODA4MDB9.nclc7qrprtTvsO19yor7_he4jRo7uLr-0cgcv0hUQWk " =4110x1235")

+++++
mermaid code

```mermaid
%%{init: {'flowchart': {'useMaxWidth': false, 'width': 1400}}}%%
flowchart LR
    subgraph github["GitHub - repository"]
        direction TB
        featBranch["feature branch"]
        masterBranch(["master"])
        relTag{{"tag vMAJOR.MINOR.PATCH"}}
        featBranch -->|"pull request"| masterBranch
        masterBranch -->|"git tag v6.5.1"| relTag
    end

    subgraph deployment["agroportal_deployment"]
        direction TB
        preCmd["./deploy.sh UI pre_prod"]
        prodCmd["./deploy.sh UI prod v6.5.1"]
        tagCheck{"v6.5.1 tag exists?"}
        abortMsg["deploy aborts"]
        prodCmd --> tagCheck
        tagCheck -->|"no"| abortMsg
    end

    subgraph servers["Servers"]
        direction TB
        preSrv[["pre-production"]]
        prodSrv[["production"]]
    end

    masterBranch ==>|"every merge"| preCmd
    featBranch -.->|"test it"| preCmd
    relTag ==> prodCmd
    preCmd ==> preSrv
    tagCheck ==>|"yes"| prodSrv

    classDef guard fill:#fdecea,stroke:#c0392b,color:#7b241c
    class abortMsg guard
```

+++++
## Hotfixes

If we want to deploy a hotfix:

* We create a new branch based on the deployed tag and apply the fix there
* We cherry-pick the fix on top of the master branch
* tag this branch
* deploy it 

 ![](https://wiki.agroportal.eu/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzLzVmNTFjMmUyLTZlMDMtNGQzZS04ZWNiLTE2NzJkYTcxN2ZmYi9lZTg0ZDcxMi1kN2Y3LTQ1MjctODQ0My1mODNmNjcwMGEzOWIvbWVybWFpZC1kaWFncmFtLTIwMjYtMDgtMjYtMTE1MDUyLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzkzODk0NDAwLCJleHAiOjE3OTM5ODA4MDB9.giQis2bnIu0mUqaW39E-kj15YLAbClOb83g3_Af6beA " =3682x1066")

+++++
mermaid code

```mermaid
flowchart LR
    subgraph github["GitHub — application repository"]
        direction TB
        masterBranch(["master<br/>has unreleased work, not shippable yet"])
        prodTag{{"v6.5.1<br/>currently running on production"}}
        hotfixBranch["hotfix/fix-xyz"]
        hotfixTag{{"v6.5.2"}}

        prodTag ==>|"git switch -c hotfix/fix-xyz v6.5.1<br/>commit the fix"| hotfixBranch
        hotfixBranch ==>|"git tag v6.5.2<br/>git push origin v6.5.2"| hotfixTag
        hotfixBranch -->|"cherry-pick or PR<br/>so the next release keeps the fix"| masterBranch
    end

    subgraph deployment["agroportal_deployment"]
        direction TB
        preCmd["./deploy.sh UI pre_production hotfix/fix-xyz"]
        prodCmd["./deploy.sh UI production v6.5.2"]
    end

    subgraph servers["Servers"]
        direction TB
        preSrv[["pre-production"]]
        prodSrv[["production"]]
    end

    hotfixBranch -.->|"optional: check the fix first"| preCmd
    hotfixTag ==> prodCmd
    preCmd -.-> preSrv
    prodCmd ==> prodSrv

    blocked["the hotfix branch itself never goes to production<br/>it ships as the tag v6.5.2"]
    hotfixBranch -.-> blocked

    classDef guard fill:#fdecea,stroke:#c0392b,color:#7b241c
    class blocked guard
```

+++++

---

**Documents**

- [💁‍♂️ Acknowledgments](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/acknowledgments-15GdRXLQdm)
- [📚Publications and references](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/publications-and-references-87tEoeoGKy)
- [🗽Terms & Conditions](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/terms-conditions-naDsDo2Zxq)
- [🧞‍♂️Metadata guidelines and recommendations](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/metadata-guidelines-and-recommendations-pOFbK9sIfp)
- [📜 AgroPortal Release Notes](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/agroportal-release-notes-btKjZk5tU2)
- [ 👩‍🚀 User Guide](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/user-guide-ZszoBwfjGF)
- [📎 API Documentation](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/api-documentation-kMCurGKD97)
- [🤖 Developer Documentation](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/developer-documentation-LhsrucqGTa)
- [🗃External Documentation](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/external-documentation-vNPQCdArrr)
- [AgroPortal infrastructure](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/agroportal-infrastructure-ietsAU4kPs)