Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add githooks #1373

Merged
merged 10 commits into from
Aug 9, 2023
Merged

feat: add githooks #1373

merged 10 commits into from
Aug 9, 2023

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Aug 8, 2023

Description

Ticket: INTMDB-968

This PR adds git hooks to terraform and updated CONTRIBUTING.md

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contribution guidelines
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

Install the hook

make link-git-hooks                                                                                                         1.20.3  3.1.1  16.18.0 bazel 5.4.0
==> Installing all git hooks...
find .git/hooks -type l -exec rm {} \;
find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \;

Run

git commit -m "test"                                                                                                        1.20.3  3.1.1  16.18.0 bazel 5.4.0
Formatting go files
Checking the format of Terraform files
==> Checking that code complies with gofmt requirements...
~/workspace/terraform-provider-mongodbatlas/examples/Atlas_Database_Users ~/workspace/terraform-provider-mongodbatlas

===> Validating Syntax Example: ./examples/Atlas_Database_Users <===

~/workspace/terraform-provider-mongodbatlas
~/workspace/terraform-provider-mongodbatlas/examples/Federated-Settings ~/workspace/terraform-provider-mongodbatlas

===> Validating Syntax Example: ./examples/Federated-Settings <===

~/workspace/terraform-provider-mongodbatlas
~/workspace/terraform-provider-mongodbatlas/examples/MongoDB-Atlas-AWS-VPC-Peering ~/workspace/terraform-provider-mongodbatlas

===> Validating Syntax Example: ./examples/MongoDB-Atlas-AWS-VPC-Peering <===

~/workspace/terraform-provider-mongodbatlas
~/workspace/terraform-provider-mongodbatlas/examples/MongoDB-Atlas-GCP-VPC-Peering ~/workspace/terraform-provider-mongodbatlas

===> Validating Syntax Example: ./examples/MongoDB-Atlas-GCP-VPC-Peering <===

~/workspace/terraform-provider-mongodbatlas
~/workspace/terraform-provider-mongodbatlas/examples/atlas-advanced-cluster/global-cluster ~/workspace/terraform-provider-mongodbatlas

.........

===> Validating Syntax Example: ./examples/third-party-integration/datadog <===

~/workspace/terraform-provider-mongodbatlas
~/workspace/terraform-provider-mongodbatlas/examples/third-party-integration/prometheus-and-teams ~/workspace/terraform-provider-mongodbatlas

===> Validating Syntax Example: ./examples/third-party-integration/prometheus-and-teams <===

~/workspace/terraform-provider-mongodbatlas
Checking the format of website files
==> Checking website against linters...
[INTMDB-968 85c90a9f] test
 2 files changed, 2 insertions(+), 2 deletions(-)
~/workspace/terraform-provider-mongodbatlas  INTMDB-968 ⇡1 *27 !1 ❯                                                                                                                         6s  1.20.3  3.1.1  16.18.0 bazel 5.4.0

@andreaangiolillo andreaangiolillo marked this pull request as ready for review August 8, 2023 14:07
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner August 8, 2023 14:07
@AgustinBettati
Copy link
Member

Might be worth adjusting CONTRIBUTING guide, similar to how git hook configuration is mentioned here https://github.com/mongodb/mongodb-atlas-cli/blob/master/CONTRIBUTING.md#building-and-testing

@andreaangiolillo
Copy link
Collaborator Author

@AgustinBettati Done. Ready for review

Copy link
Member

@AgustinBettati AgustinBettati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andreaangiolillo andreaangiolillo merged commit 2a30752 into master Aug 9, 2023
@andreaangiolillo andreaangiolillo deleted the INTMDB-968 branch August 9, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants