Thank you for your interest in contributing to Aviation Integration Service!
Please follow these rules to ensure quality and consistency in the project.
- Fork the repository and clone your local copy.
- Create a branch for your improvement or fix:
git checkout -b feature/your-feature-name
- Make small and descriptive commits using Conventional Commits:
- Example:
feat: add flights endpointfix: fix validation in airlinesdocs: update READMEchore: update dependencies- Use
!for breaking changes:refactor!: remove backward compatibility
- Example:
- Follow the branch naming convention:
feature/for new features.fix/for bug fixes.docs/for documentation.chore/for minor or maintenance tasks.release/vX.Y.Zto prepare a new release.
- Make a Pull Request to
develop.- Do not push changes directly to
master.
- Do not push changes directly to
- Wait for review and make the suggested changes.
- To release a new production version:
- Create a
release/vX.Y.Zbranch fromdevelop(choose the new version based on the changes). - Make a Pull Request from
release/vX.Y.Ztomaster.
(Don’t forget to document changes in the PR.) - When merged, a
vX.Y.Ztag will be generated automatically and the release will be deployed to production. - If you name the branch just
release/, the system will automatically increment the last patch (e.g., fromv1.2.3tov1.2.4).
- Create a
- Never upload your real
.envfile or credentials.
Note:
Branch protection prevents direct push to master and requires PRs for any production changes. Deployment only runs when pushing a new tag starting with v.
- Use TypeScript and follow the repo’s folder architecture.
- Run
npm run lint(if available) before committing. - Use single quotes (
') and semicolons (;). - Keep methods and files small and well commented.
Before submitting a PR, make sure to:
-
Run all tests with:
make test -
Verify that there are no open handles or unclosed connections.
-
If you added new endpoints or validations, include tests:
- Unit tests (
/test/unit) - Integration tests (
/test/integration)
- Unit tests (
⚠️ PRs without new tests (when adding features) will be rejected.
- Avoid complex logic in controllers; delegate to services.
- Prefer pure and decoupled functions, easy to test.
- Add comments only if the code isn’t self-explanatory.
- Do not leave
console.log; uselogger.debug/info/error.
- Direct push is not allowed to
masteror protected branches (master,develop,releases). - All changes in
masterrequire a Pull Request and approval from at least 1 reviewer. - All automated tests must pass before merging.
- Force-push (
--force) or deleting protected branches is not allowed. - To update your branch: do a rebase or merge from
developbefore opening the PR tomaster. - Release branches: use the pattern
release/vX.Y.Zand open a PR tomasterfor deployment. - Only tags in the
vX.Y.Zformat trigger the production workflow.
- PRs will be reviewed by at least one collaborator.
- No changes will be accepted without clear justification or without automated tests (if applicable).
- If your change breaks the tests, it will be rejected until fixed.
- If you add new endpoints (e.g.
/api/v1/airlines), you must include:- Unit tests for the new controllers/services
- Integration tests for the new endpoints
- Documentation updates in
README.mdanddocs/API.md
- Do not upload
.envfiles or secrets. - Use environment variables as per the
.env.exampletemplate.
-
Automatic deploy (recommended):
- Production deployment is performed only when creating a
vX.Y.Ztag in GitHub. - The recommended flow is:
- Work on feature branches and merge to
develop. - When ready for release, create a
release/vX.Y.Zbranch fromdevelop. - Open a Pull Request from
release/vX.Y.Ztomaster. - Once approved and merged to
master, create the tag (vX.Y.Z) pointing tomaster. - When the tag is pushed, GitHub Actions automatically deploys to Cloud Run using the
GCP_SA_KEYsecret.
- Work on feature branches and merge to
- Production deployment is performed only when creating a
-
Manual deploy (optional):
- Get a service key (JSON) with
Cloud Run Admin,Storage Admin, andCloud Buildpermissions. - Authenticate locally:
gcloud auth activate-service-account --key-file gcp-key.json
- Launch the manual deploy:
make deploy
- Get a service key (JSON) with
-
Important:
Do not deploy directly to production outside this flow.
The pipeline only runs for tags that follow thev*pattern (e.g.,v1.0.0).
Thank you for helping to improve this project!