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

Add a pre-commit setup to the repository. #2176

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Nov 14, 2023

Changes

This will allow us to run some checks before committing. If direnv is enabled in the developer environment and pre-commit available, it will automatically install the hooks for the repository.

On top of #2175.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

See the contribution guide
for more details.

Release Notes

NONE

@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Nov 14, 2023
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 14, 2023
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
@chmouel
Copy link
Member

chmouel commented Nov 15, 2023

I am good with the pre-commit part but still have concerns about .env file committed into the repo, the linked wiki page in the direnv wiki is not very clear of the advantages of doing this....

This will allow us to run some checks before committing.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
@chmouel
Copy link
Member

chmouel commented Nov 15, 2023

Thanks for the update without dotenv,

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 15, 2023
@roman-kiselenko
Copy link

roman-kiselenko commented Nov 15, 2023

I guess the note about pre-commit installation should be in the https://github.com/tektoncd/cli/blob/main/DEVELOPMENT.md#requirements 🤔

@chmouel
Copy link
Member

chmouel commented Nov 15, 2023

@roman-kiselenko that would be a great in this document have a brief explanation about what pre-commit does and how to install the hooks (basically run pre-commit binary at the root directory)

maybe mentions this as well in the pull request template with a link to that doc

@chmouel
Copy link
Member

chmouel commented Nov 21, 2023

/lgtm

@piyush-garg
Copy link
Contributor

/approve

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: piyush-garg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 21, 2023
@tekton-robot tekton-robot merged commit 4730dfb into tektoncd:main Nov 21, 2023
8 checks passed
@vdemeester vdemeester deleted the add-pre-commit branch November 21, 2023 16:10
vinamra28 added a commit that referenced this pull request Jan 11, 2024
#2178 | [vinamra28] Bump choco and readme to v0.33.0 | 2023/11/16-07:52
#2178 | [vinamra28] Fix the release script | 2023/11/16-07:52
#2177 | [dependabot[bot]] Bump github.com/tektoncd/pipeline from 0.53.0 to 0.53.1 | 2023/11/16-11:30
#2180 | [dependabot[bot]] Bump github.com/tektoncd/triggers from 0.25.2 to 0.25.3 | 2023/11/16-18:28
#2181 | [dependabot[bot]] Bump github.com/tektoncd/pipeline from 0.53.1 to 0.53.2 | 2023/11/17-07:00
#2179 | [dependabot[bot]] Bump k8s.io/cli-runtime from 0.26.10 to 0.26.11 | 2023/11/17-07:40
#2182 | [dependabot[bot]] Bump github.com/creack/pty from 1.1.20 to 1.1.21 | 2023/11/20-06:08
#2130 | [William Fish] update the `task start` cmd to also allow an oci bundle with a task name to be created from the cli | 2023/11/21-10:00
#2130 | [William Fish] update make lint to run goimports and download it to the correct place | 2023/11/21-10:00
#2176 | [Vincent Demeester] Add a pre-commit setup to the repository. | 2023/11/21-15:38
null | [dependabot[bot]] Bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 | 2023/11/22-06:36
null | [dependabot[bot]] Bump github.com/tektoncd/hub from 1.15.0 to 1.15.1 | 2023/11/27-15:20
null | [dependabot[bot]] Bump knative.dev/serving | 2023/11/28-11:02
null | [dependabot[bot]] Bump golang.org/x/term from 0.14.0 to 0.15.0 | 2023/11/29-04:10
null | [dependabot[bot]] Bump github.com/tektoncd/pipeline from 0.53.2 to 0.54.0 | 2023/11/29-05:06
null | [dependabot[bot]] Bump github.com/ktr0731/go-fuzzyfinder from 0.7.0 to 0.8.0 | 2023/11/30-16:06
null | [dependabot[bot]] Bump github.com/theupdateframework/go-tuf from 0.6.1 to 0.7.0 | 2023/12/01-06:56
null | [dependabot[bot]] Bump github.com/google/go-containerregistry from 0.16.1 to 0.17.0 | 2023/12/02-05:48
null | [dependabot[bot]] Bump github.com/sigstore/sigstore from 1.7.5 to 1.7.6 | 2023/12/05-04:02
null | [dependabot[bot]] Bump golang.org/x/crypto from 0.16.0 to 0.17.0 | 2023/12/19-07:22
null | [dependabot[bot]] Bump github.com/tektoncd/pipeline from 0.54.0 to 0.54.1 | 2023/12/21-07:16
null | [dependabot[bot]] Bump github.com/tektoncd/pipeline from 0.54.1 to 0.54.2 | 2023/12/22-02:10
null | [dependabot[bot]] Bump github.com/sigstore/sigstore from 1.7.6 to 1.8.0 | 2023/12/22-03:22
null | [dependabot[bot]] Bump k8s.io/cli-runtime from 0.26.11 to 0.26.12 | 2023/12/22-04:20
null | [dependabot[bot]] Bump github.com/tektoncd/pipeline from 0.54.2 to 0.55.0 | 2023/12/22-06:58
null | [Piyush Garg] Bump sigstore/cosign to v2.2.2 | 2023/12/22-13:42
null | [PuneetPunamiya] Adds hub version in output of `tkn version` command | 2024/01/03-07:22
null | [dependabot[bot]] Bump golang.org/x/term from 0.15.0 to 0.16.0 | 2024/01/07-07:54
null | [dependabot[bot]] Bump github.com/cloudflare/circl from 1.3.5 to 1.3.7 | 2024/01/09-06:54
null | [vinamra28] Bump golang and goreleaser versions | 2024/01/11-11:12

Signed-off-by: vinamra28 <jvinamra776@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants