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: fix formatting before commit #1779

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

lakshz
Copy link
Contributor

@lakshz lakshz commented Feb 2, 2024

What kind of change does this PR introduce?
This PR adds a pre-commit script run, to fix formatting

Issue Number:

Fixes #1778

Did you add tests for your changes?

Snapshots/Videos:

If relevant, did you update the documentation?

Summary

Does this PR introduce a breaking change?

Other information

Have you read the contributing guide?

Copy link

github-actions bot commented Feb 2, 2024

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

@Cioppolo14
Copy link
Contributor

@LakshyaSatpal Please fix the failing tests.

@Cioppolo14
Copy link
Contributor

You may need to merge with the latest upstream.

@lakshz
Copy link
Contributor Author

lakshz commented Feb 2, 2024

My branch up to date with develop. The error in tests is unrelated to my changes.
The problem is package.json does not include ts-node as a dependency, and import:sample-data script is directly using it. Not sure, what has caused this issue.

@palisadoes
Copy link
Contributor

Please restore the ts-node dependency in this PR.

@lakshz
Copy link
Contributor Author

lakshz commented Feb 2, 2024

I see lint-staged is configured to format the staged files on a commit. Was this a recent change? since I did faced failing tests due to formatting in my PR #1774

I don't think we need to run format:fix as a separate script in pre-commit then.

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 86 lines in your changes are missing coverage. Please review.

Comparison is base (c0468a4) 98.17% compared to head (1cb885a) 98.14%.
Report is 225 commits behind head on develop.

Files Patch % Lines
src/libraries/errors/ImageSizeLimitExceeded.ts 27.27% 16 Missing ⚠️
src/resolvers/Mutation/updateUserProfile.ts 70.90% 1 Missing and 15 partials ⚠️
src/resolvers/Mutation/createEvent.ts 83.51% 13 Missing and 2 partials ⚠️
src/resolvers/middleware/currentUserExists.ts 45.83% 13 Missing ⚠️
src/libraries/logger.ts 16.66% 10 Missing ⚠️
src/resolvers/Mutation/createPost.ts 90.32% 6 Missing ⚠️
src/resolvers/Mutation/createOrganization.ts 95.78% 4 Missing ⚠️
src/resolvers/Mutation/removeAdvertisement.ts 92.85% 2 Missing ⚠️
...c/resolvers/Query/postsByOrganizationConnection.ts 33.33% 2 Missing ⚠️
src/helpers/eventInstances/weekly.ts 98.11% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1779      +/-   ##
===========================================
- Coverage    98.17%   98.14%   -0.04%     
===========================================
  Files          184      226      +42     
  Lines        10767    13685    +2918     
  Branches       835     1144     +309     
===========================================
+ Hits         10571    13431    +2860     
- Misses         186      222      +36     
- Partials        10       32      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lakshz
Copy link
Contributor Author

lakshz commented Feb 2, 2024

@palisadoes Tests are passing now.

@palisadoes
Copy link
Contributor

  1. What was changed in this PR?
  2. Was it just the restoration of the ts-node package?
  3. What PR removed ts-node in the first place?

@palisadoes
Copy link
Contributor

  1. I just checked. This package hasn't been in package.json since last year and data importations have worked.
  2. Your edit to the husky file is just a minor text edit. They have no bearing on formatting
  3. This work seems invalid.
  4. Closing

@palisadoes palisadoes closed this Feb 2, 2024
@palisadoes palisadoes reopened this Feb 2, 2024
@palisadoes
Copy link
Contributor

Merging. Something isn't right

@palisadoes palisadoes merged commit 2c2e70a into PalisadoesFoundation:develop Feb 2, 2024
13 of 19 checks passed
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