diff --git a/.github/disabled_workflows/castor.yml b/.github/disabled_workflows/castor.yml deleted file mode 100644 index ade4209dd2..0000000000 --- a/.github/disabled_workflows/castor.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Castor testing workflow - -# Cancel previously running workflows if new commit pushed to the branch -# this will help to push fixes earlier and stop previous workflows -concurrency: - group: ${{ github.head_ref }}${{ github.ref }}-castor - cancel-in-progress: true - -on: - push: - branches: - - "main" - paths: - - ".github/workflows/castor.yml" - - ".github/workflows/scala-unit-tests.yml" - - "castor/**" - pull_request: - paths: - - ".github/workflows/castor.yml" - - ".github/workflows/scala-unit-tests.yml" - - "castor/**" - -jobs: - build-and-test-castor: - uses: ./.github/workflows/scala-unit-tests.yml - with: - component-name: "Castor" - component-dir: "castor/lib" - secrets: inherit diff --git a/.github/disabled_workflows/connect.yml b/.github/disabled_workflows/connect.yml deleted file mode 100644 index 65be4b8856..0000000000 --- a/.github/disabled_workflows/connect.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Connect testing workflow - -# Cancel previously running workflows if new commit pushed to the branch -# this will help to push fixes earlier and stop previous workflows -concurrency: - group: ${{ github.head_ref }}${{ github.ref }}-connect - cancel-in-progress: true - -on: - push: - branches: - - "main" - paths: - - ".github/workflows/connect.yml" - - ".github/workflows/scala-unit-tests.yml" - - "connect/lib/**" - pull_request: - paths: - - ".github/workflows/connect.yml" - - ".github/workflows/scala-unit-tests.yml" - - "connect/lib/**" - -jobs: - build-and-test-connect: - uses: ./.github/workflows/scala-unit-tests.yml - with: - component-name: "Connect Lib" - component-dir: "connect/lib" - secrets: inherit diff --git a/.github/disabled_workflows/iris-client.yml b/.github/disabled_workflows/iris-client.yml deleted file mode 100644 index d7a6a04607..0000000000 --- a/.github/disabled_workflows/iris-client.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Iris client testing workflow - -# Cancel previously running workflows if new commit pushed to the branch -# this will help to push fixes earlier and stop previous workflows -concurrency: - group: ${{ github.head_ref }}${{ github.ref }}-iris-client - cancel-in-progress: true - -on: - push: - branches: - - "main" - paths: - - ".github/workflows/iris-client.yml" - - ".github/workflows/scala-unit-tests.yml" - - "iris/client/**" - pull_request: - paths: - - ".github/workflows/iris-client.yml" - - ".github/workflows/scala-unit-tests.yml" - - "iris/client/**" - -jobs: - build-and-test-iris-client: - uses: ./.github/workflows/scala-unit-tests.yml - with: - component-name: "Iris Client" - component-dir: "iris/client/scala-client" - measure-coverage: false - secrets: inherit diff --git a/.github/disabled_workflows/iris-service.yml b/.github/disabled_workflows/iris-service.yml deleted file mode 100644 index f69cdd74e6..0000000000 --- a/.github/disabled_workflows/iris-service.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Iris service testing workflow - -# Cancel previously running workflows if new commit pushed to the branch -# this will help to push fixes earlier and stop previous workflows -concurrency: - group: ${{ github.head_ref }}${{ github.ref }}-iris-service - cancel-in-progress: true - -on: - push: - branches: - - "main" - paths: - - ".github/workflows/iris-service.yml" - - ".github/workflows/scala-unit-tests.yml" - - "iris/service/**" - pull_request: - paths: - - ".github/workflows/iris-service.yml" - - ".github/workflows/scala-unit-tests.yml" - - "iris/service/**" - -jobs: - build-and-test-iris-service: - uses: ./.github/workflows/scala-unit-tests.yml - with: - component-name: "Iris Service" - component-dir: "iris/service" - measure-coverage: false - secrets: inherit - release: - if: github.event_name == 'push' - uses: ./.github/workflows/release.yml - with: - release-component: "iris/service" - secrets: inherit diff --git a/.github/disabled_workflows/mercury-mediator.yml b/.github/disabled_workflows/mercury-mediator.yml deleted file mode 100644 index e6e6e95fb2..0000000000 --- a/.github/disabled_workflows/mercury-mediator.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Mercury mediator testing workflow - -# Cancel previously running workflows if new commit pushed to the branch -# this will help to push fixes earlier and stop previous workflows -concurrency: - group: ${{ github.head_ref }}${{ github.ref }}-mercury-mediator - cancel-in-progress: true - -on: - push: - branches: - - "main" - paths: - - ".github/workflows/mercury-mediator.yml" - - ".github/workflows/scala-unit-tests.yml" - - "mercury-mediator/**" - pull_request: - paths: - - ".github/workflows/mercury-mediator.yml" - - ".github/workflows/scala-unit-tests.yml" - - "mercury-mediator/**" - -jobs: - build-and-test-mercury-mediator: - uses: ./.github/workflows/scala-unit-tests.yml - with: - component-name: "Mercury Mediator" - component-dir: "mercury/mercury-mediator" - measure-coverage: false - secrets: inherit - release: - if: github.event_name == 'push' - uses: ./.github/workflows/release.yml - with: - release-component: "mercury/mercury-mediator" - secrets: inherit diff --git a/.github/disabled_workflows/mercury.yml b/.github/disabled_workflows/mercury.yml deleted file mode 100644 index 138ccb3e2f..0000000000 --- a/.github/disabled_workflows/mercury.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Mercury testing workflow - -# Cancel previously running workflows if new commit pushed to the branch -# this will help to push fixes earlier and stop previous workflows -concurrency: - group: ${{ github.head_ref }}${{ github.ref }}-mercury - cancel-in-progress: true - -on: - push: - branches: - - "main" - paths: - - ".github/workflows/mercury.yml" - - ".github/workflows/scala-unit-tests.yml" - - "mercury/mercury-library/**" - pull_request: - paths: - - ".github/workflows/mercury.yml" - - ".github/workflows/scala-unit-tests.yml" - - "mercury/mercury-library/**" - -jobs: - build-and-test-mercury: - uses: ./.github/workflows/scala-unit-tests.yml - with: - component-name: "Mercury Lib" - component-dir: "mercury/mercury-library" - secrets: inherit diff --git a/.github/disabled_workflows/pollux.yml b/.github/disabled_workflows/pollux.yml deleted file mode 100644 index 1eb8f5ab5a..0000000000 --- a/.github/disabled_workflows/pollux.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Pollux testing workflow - -# Cancel previously running workflows if new commit pushed to the branch -# this will help to push fixes earlier and stop previous workflows -concurrency: - group: ${{ github.head_ref }}${{ github.ref }}-pollux - cancel-in-progress: true - -on: - push: - branches: - - "main" - paths: - - ".github/workflows/pollux.yml" - - ".github/workflows/scala-unit-tests.yml" - - "pollux/**" - pull_request: - paths: - - ".github/workflows/pollux.yml" - - ".github/workflows/scala-unit-tests.yml" - - "pollux/**" - -jobs: - build-and-test-pollux: - uses: ./.github/workflows/scala-unit-tests.yml - with: - component-name: "Pollux Lib" - component-dir: "pollux/lib" - secrets: inherit diff --git a/.github/disabled_workflows/prism-agent.yml b/.github/disabled_workflows/prism-agent.yml deleted file mode 100644 index 37d35a9770..0000000000 --- a/.github/disabled_workflows/prism-agent.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Prism agent testing workflow - -# Cancel previously running workflows if new commit pushed to the branch -# this will help to push fixes earlier and stop previous workflows -concurrency: - group: ${{ github.head_ref }}${{ github.ref }}-prism-agent - -on: - push: - tags: - - "*" - branches: - - "main" - paths: - - ".github/workflows/prism-agent.yml" - - ".github/workflows/scala-unit-tests.yml" - - "prism-agent/**" - pull_request: - paths: - - ".github/workflows/prism-agent.yml" - - ".github/workflows/scala-unit-tests.yml" - - "prism-agent/**" - -jobs: - build-and-test-prism-agent: - uses: ./.github/workflows/scala-unit-tests.yml - with: - component-name: "PRISM Agent" - component-dir: "prism-agent/service" - secrets: inherit - release: - if: github.event_name == 'push' && !contains(github.event.head_commit.message, 'chore(release)') - uses: ./.github/workflows/release.yml - with: - release-component: "prism-agent/service" - secrets: inherit - deploy: - if: startsWith(github.ref, 'refs/tags') && contains(github.event.head_commit.message, 'chore(release)') - uses: ./.github/workflows/deployment.yml - with: - component-tag: "${{ github.ref_name }}" - env: "dev" - secrets: inherit diff --git a/.github/disabled_workflows/prism-node-client.yml b/.github/disabled_workflows/prism-node-client.yml deleted file mode 100644 index e7b3f2039b..0000000000 --- a/.github/disabled_workflows/prism-node-client.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Prism node client testing workflow - -# Cancel previously running workflows if new commit pushed to the branch -# this will help to push fixes earlier and stop previous workflows -concurrency: - group: ${{ github.head_ref }}${{ github.ref }}-prism-node-client - cancel-in-progress: true - -on: - push: - branches: - - "main" - paths: - - ".github/workflows/prism-node-client.yml" - - ".github/workflows/scala-unit-tests.yml" - - "prism-node/client/**" - pull_request: - paths: - - ".github/workflows/prism-node-client.yml" - - ".github/workflows/scala-unit-tests.yml" - - "prism-node/client/**" - -jobs: - build-and-test-prism-node-client: - uses: ./.github/workflows/scala-unit-tests.yml - with: - component-name: "PRISM Node Client" - component-dir: "prism-node/client/scala-client" - measure-coverage: false - secrets: inherit diff --git a/.github/docker/Dockerfile b/.github/docker/Dockerfile new file mode 100644 index 0000000000..0966ec3fb9 --- /dev/null +++ b/.github/docker/Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:22.04 + +RUN apt-get update && \ + apt-get install --no-install-recommends --yes \ + git=1:2.* \ + curl=7.* \ + wget=1.21.* \ + unzip=6.* \ + zip=3.* \ + jq=1.* \ + python3=3.10.* \ + python3-pip=22.* \ + python3-setuptools=59.6.* \ + python3-wheel=0.37.* \ + gnupg=2.2.* \ + default-jre=2:1.* \ + build-essential=12.* && \ + echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list && \ + echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list && \ + curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import && \ + chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg && \ + apt-get --allow-releaseinfo-change update && \ + apt-get install --no-install-recommends --yes \ + sbt=1.4.* \ + && rm -rf /var/lib/apt/lists/* diff --git a/.github/workflows/build-test-docker.yml b/.github/workflows/build-test-docker.yml new file mode 100644 index 0000000000..3d9432b2ab --- /dev/null +++ b/.github/workflows/build-test-docker.yml @@ -0,0 +1,60 @@ +name: Build Test Docker image + +on: + push: + branches: ["main"] + paths: + - ".github/docker/**" + - ".github/workflows/build-test-docker.yml" + pull_request: + paths: + - ".github/docker/**" + - ".github/workflows/build-test-docker.yml" + +env: + REGISTRY: ghcr.io + IMAGE_NAME: agent-ci-ubuntu-22-jdk-11 + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v3 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build Docker image + if: ${{ github.event_name == 'pull_request' }} + uses: docker/build-push-action@v2 + with: + context: .github/docker + push: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Build and push Docker image + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + uses: docker/build-push-action@v2 + with: + context: .github/docker + push: true + tags: | + "ghcr.io/input-output-hk/${{ env.IMAGE_NAME }}:latest" + "ghcr.io/input-output-hk/${{ env.IMAGE_NAME }}:main" + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 1d895e391f..c6b57f753f 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -35,7 +35,7 @@ jobs: java-version: openjdk@1.11 - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v2.8.0 - name: Install Python uses: actions/setup-python@v2 diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.yml index cdc51d3228..b7998ed729 100644 --- a/.github/workflows/performance-tests.yml +++ b/.github/workflows/performance-tests.yml @@ -32,7 +32,7 @@ jobs: java-version: openjdk@1.11 - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v2.8.0 - name: Login to GitHub Container Registry uses: docker/login-action@v2 diff --git a/.github/workflows/release-clients.yml b/.github/workflows/release-clients.yml index e07395bdde..9ad37fbed4 100644 --- a/.github/workflows/release-clients.yml +++ b/.github/workflows/release-clients.yml @@ -32,7 +32,7 @@ jobs: python-version: '3.10' - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v2.8.0 - name: Login to Github Hub uses: docker/login-action@v2 diff --git a/.github/workflows/unit-tests-common.yml b/.github/workflows/unit-tests-common.yml index 86a2cdefdc..8f02e5b22d 100644 --- a/.github/workflows/unit-tests-common.yml +++ b/.github/workflows/unit-tests-common.yml @@ -19,7 +19,7 @@ jobs: name: "Build and unit tests for ${{ inputs.component-name }}" runs-on: self-hosted container: - image: ghcr.io/input-output-hk/atala-qa-automation + image: ghcr.io/input-output-hk/agent-ci-ubuntu-22-jdk-11:0.1.0 volumes: - /nix:/nix credentials: diff --git a/CHANGELOG.md b/CHANGELOG.md index 7855f0ac52..d45be32438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# [1.12.0](https://github.com/input-output-hk/atala-prism-building-blocks/compare/prism-agent-v1.11.0...prism-agent-v1.12.0) (2023-08-31) + + +### Bug Fixes + +* **prism-agent:** invitation expiry configuration and new state ([#655](https://github.com/input-output-hk/atala-prism-building-blocks/issues/655)) ([c61999d](https://github.com/input-output-hk/atala-prism-building-blocks/commit/c61999dd2a256401c30d29b842f0092f4968c6ed)) + + +### Features + +* add anoncreds credential definition rest api ([#624](https://github.com/input-output-hk/atala-prism-building-blocks/issues/624)) ([99e338a](https://github.com/input-output-hk/atala-prism-building-blocks/commit/99e338af6dc1ab2b4b42f4b1bee2a917ccb77b4c)) +* allow external API keys to be defined for an agent ([#643](https://github.com/input-output-hk/atala-prism-building-blocks/issues/643)) ([756dea7](https://github.com/input-output-hk/atala-prism-building-blocks/commit/756dea707b1ced9de800cdabfded6dfc100e340e)) +* ATL-5571 Generalized Vault to Store Json ([#650](https://github.com/input-output-hk/atala-prism-building-blocks/issues/650)) ([ebf0328](https://github.com/input-output-hk/atala-prism-building-blocks/commit/ebf0328cfb5107954766fe93ffc6b42f4e5a4cb0)) +* ATL-5574 Prime Anoncred Lib ([#652](https://github.com/input-output-hk/atala-prism-building-blocks/issues/652)) ([70b2f16](https://github.com/input-output-hk/atala-prism-building-blocks/commit/70b2f16beecdef7eeeabb18f1b25244046ba5a65)) +* ATL-5575 Generalize and Streamline Json Schema SerDes logic ([#653](https://github.com/input-output-hk/atala-prism-building-blocks/issues/653)) ([eb4f8f4](https://github.com/input-output-hk/atala-prism-building-blocks/commit/eb4f8f488bcef421e20f770669dfff99f4c1dd98)) + # [1.11.0](https://github.com/input-output-hk/atala-prism-building-blocks/compare/prism-agent-v1.10.0...prism-agent-v1.11.0) (2023-08-21) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e147b01527..480ca729d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,293 +3,128 @@ We would love for you to contribute to Atala PRISM and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow: -- [Pull Requests](#pull-requests) -- [Commit Message Guidelines](#commits) -- [Release process](#releases) -- Software development lifecycle (TBD) + - [DCO](#dco) + - [Issues and Bugs](#issue) + - [Feature Requests](#feature) + - [Submission Guidelines](#submit) + - [Coding Rules](#rules) + - [Commit Message Guidelines](#commit) + +## Developer Certificate of Origin (DCO) -## Pull Requests +PRISM Cloud Agent enforces the Developer Certificate of Origin (DCO). It requires all commit messages to contain the `Signed-off-by` line with an email address that matches the commit author and the name on your GitHub account. -### Submitting a Pull Request +Please read and follow set up [DCO](./DCO.md). -**All code changes to the `main` branch must go through Pull Requests (PRs)** +## Found a Bug? -To create a Pull Request, follow the [Official GitHub PR guidelines](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) +If you find a bug in the source code, you can help us by [submitting an issue](#submit-issue). -> Use `Create draft pull Request` option to create work-in-progress (WIP) PRs. -> Remove draft state when PR is ready for review. +Even better, you can [submit a Pull Request](#submit-pr) with a fix. -Each pull request should be small enough to be reviewed in less than 30 minutes. -Otherwise, break the PR into several ones. -**NOTE**: It's important to create new commits when addressing the reviewer comments (instead of `git commit --amend`), so that we know what exactly changed. +## Missing a Feature? -### Pull Request naming +You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub Repository. +If you would like to *implement* a new feature, please consider the size of the change in order to determine the right steps to proceed: -Pull Requests are expected to be named like `[ATL-XXXX]: short description` (ticket id as prefix with a short but understandable description). +* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed. + This process allows us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project. -> Please note, PR title should not be a part of the `main` branch commit history. All commits in `main` should correspond to the [Commit Message Guidelines](#commits). + **Note**: Adding a new topic to the documentation, or significantly re-writing a topic, counts as a major feature. -### Pull Request checklist +* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). -All Pull Requests will get a checklist that everyone is expected to follow, failing to do so might delay people getting to review it. -Check the [PR checklist](.github/PULL_REQUEST_TEMPLATE.md) for more info. +## Submission Guidelines -### Pull request CI checks +### Submitting an Issue -All pull requests will be subject to the following checks and actions: +Before you submit an issue, please search the issue tracker. An issue for your problem might already exist and the discussion might inform you of workarounds readily available. -| Name | Type | Description | -|-----------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Linter | Check | Powered by megalinter - any changed source will be checked against configured linting rules (configured in .mega-linter.yml at root of repository). No automatic fixes will be generated. If the check fails, the author of the pull request must fix issues and update pull request. | -| Pull request labeller | Action | Pull Request will be labelled based upon directory structure | +You can file new issues by selecting a `Bug Report` template on our [Issues submition page](https://github.com/input-output-hk/atala-prism-building-blocks/issues/new/choose). -Linting is also available as part of the pre-commit hooks, this will follow the same rules as the CI checks in that it will not automatically fix linting issues. +### Submitting a Pull Request (PR) -> You must run `pre-commit install` to install these hooks once you have cloned the repository. Instructions can be found [here](https://pre-commit.com/#usage) +Before you submit your Pull Request (PR) consider the following guidelines: -In order to automatically fix linting issues, you must install and run the megalinter tool yourself. Instructions for running locally can be found [here](https://megalinter.io/latest/mega-linter-runner/) +1. Search [GitHub](https://github.com/input-output-hk/atala-prism-building-blocks/pulls) for an open or closed PR that relates to your submission. + You don't want to duplicate existing efforts. -Use `npx mega-linter-runner --fix` after installation to fix any detected local issues +2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. + Discussing the design upfront helps to ensure that we're ready to accept your work. -### Pull Request review +3. Make sure all your commits have DCO sign-off line with an email address that matches the commit author and the name on your GitHub account. -The team `input-output-hk/atala` will be automatically set as reviewer when the PR is created, so that 2 reviewers from the team get assigned. +4. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the https://github.com/input-output-hk/atala-prism-building-blocks repo. -After that, you can add any other reviewer that should review the PR. +5. In your forked repository, make your changes in a new git branch: -At least 1 approval is mandatory to merge a PR. + ```shell + git checkout -b my-fix-branch main + ``` -Check [CODEOWNERS](.github/CODEOWNERS) for more info about main owners/reviewers of each part of the repository. +6. Create your patch, **including appropriate test cases**. -### Pull Request merging +7. Follow our [Coding Rules](#rules). -You are responsible to merge your PRs when they are ready, before that, ensure that your branch has all the changes from the base branch (like `main`). +8. Ensure that all tests and CI checks pass. -> Avoid merge commits, use rebase instead, a simple way is to just run `git config --global pull.rebase true` on each repository or run `git config --global pull.rebase true` once to get the effect on all repositories. +9. Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). + Adherence to these conventions is necessary because release notes are automatically generated from these messages. -**NOTE** If a PR breaks `main` (usually identified by CI checks failure), we shouldn't merge it but keep it opened until we are able to merge it without breaking `main`, this applies to experimental or controversial changes. NOT merge experimental stuff, keep it in a PR. + ```shell + git commit --all + ``` + Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. -Once the Pull Request is ready to be merged, you will have 2 options: -1. `Squash and Merge` -2. `Rebase and Merge` +10. Push your branch to GitHub: -#### Squash and merge + ```shell + git push origin my-fix-branch + ``` -`Squash and Merge` feature from Github combines all the PR commits into a single one. +11. In GitHub, send a pull request to `atala-prism-building-blocks:main`. -You are expected to review the auto-generated message and update it as necessary to get a decent commit message that fully corresponds to the [Commit Message Guidelines](#commits). +That's it! Thank you for your contribution! -Use this option when all commits you made in the PR can be combined into one. +#### After your pull request is merged -If this is not the case, use `Rebase and Merge` option. +After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository: -#### Rebase and Merge +* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: -`Rebase and Merge` feature from Github attached all commits from the PR branch on top of the base branch. + ```shell + git push origin --delete my-fix-branch + ``` -You are expected to make sure that **all the commits** in the PR are corresponding to the [Commit Message Guidelines](#commits). +* Check out the main branch: -Use this option when the update you're working on contains several commits that should be merged to the `main` branch of the repository. + ```shell + git checkout main -f + ``` -## Commits +* Delete the local branch: -The following general rules are applied to all commits: + ```shell + git branch -D my-fix-branch + ``` -- Must be a small incremental change -- Must be signed and verified by GitHub +* Update your local `main` with the latest upstream version: -> Follow [signing commits](docs/guides/signing-commits.md) guide to set up GPG keys to correctly sign your commits. + ```shell + git pull --ff upstream main + ``` -### Commits Message Format +## Commit Message Format -We have very precise rules over how our Git commit messages must be formatted. -This format leads to **easier to read commit history**. +Please, follow our [Commit Message guidelines](https://handbook.atalaprism.io/engineering/sdlc/commit-guidelines) for all commits you made, and make sure your PR title is following this format. -This format is based on the [Conventional Commits Specification](https://www.conventionalcommits.org/en/v1.0.0/#summary). +## Coding Rules -Each commit message consists of a mandatory **header**, an optional **body**, and an optional **footer**. +To ensure consistency throughout the source code, keep these rules in mind as you are working: -```text -
- - - -