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

Refactor provider Interface #1499

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

chmouel
Copy link
Member

@chmouel chmouel commented Nov 14, 2023

Changes

  • Refactor provider Interface
    Remove unused params from some of the methods in the provider interface.
    Except for methods that happen before SetClient is done we have all the
    client already set in there and we don't need to set this twice.

    Fix some linting on function comment, unused params and random others

  • Add codespell to lint-md

Submitter Checklist

  • 📝 A good commit message is important for other reviewers to understand the context of your change. Please refer to How to Write a Git Commit Message for more details how to write beautiful commit messages. We rather have the commit message in the PR body and the commit message instead of an external website.
  • ♽ Run make test before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI. (or even better install pre-commit and do pre-commit install in the root of this repo).
  • ✨ We heavily rely on linters to get our code clean and consistent, please ensure that you have run make lint before submitting a PR. The markdownlint error can get usually fixed by running make fix-markdownlint (make sure it's installed first)
  • 📖 If you are adding a user facing feature or make a change of the behavior, please verify that you have documented it
  • 🧪 100% coverage is not a target but most of the time we would rather have a unit test if you make a code change.
  • 🎁 If that's something that is possible to do please ensure to check if we can add a e2e test.
  • 🔎 If there is a flakiness in the CI tests then don't necessary ignore it, better get the flakyness fixed before merging or if that's not possible there is a good reason to bypass it. (token rate limitation may be a good reason to skip).

Remove unused params from some of the methods in the provider interface.
Except for methods that happen before SetClient is done we have all the
client already set in there and we don't need to set this twice.

Fix some linting on function comment, unused params and random others

Signed-off-by: Chmouel Boudjnah <[email protected]>
Fix tools in dev guide which doesn't use anymore black/pylint but ruff.

Signed-off-by: Chmouel Boudjnah <[email protected]>
@savitaashture
Copy link
Member

/test

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

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

Comparison is base (0fc3592) 62.07% compared to head (ddac903) 62.11%.

Files Patch % Lines
pkg/provider/gitea/gitea.go 0.00% 5 Missing ⚠️
pkg/pipelineascode/pipelineascode.go 33.33% 1 Missing and 1 partial ⚠️
pkg/provider/bitbucketcloud/bitbucket.go 71.42% 2 Missing ⚠️
pkg/provider/bitbucketserver/bitbucketserver.go 71.42% 2 Missing ⚠️
pkg/provider/gitlab/gitlab.go 66.66% 2 Missing ⚠️
pkg/cmd/tknpac/bootstrap/web.go 0.00% 1 Missing ⚠️
pkg/pipelineascode/match.go 0.00% 0 Missing and 1 partial ⚠️
pkg/provider/github/status.go 92.30% 0 Missing and 1 partial ⚠️
pkg/reconciler/controller.go 0.00% 1 Missing ⚠️
pkg/reconciler/reconciler.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1499      +/-   ##
==========================================
+ Coverage   62.07%   62.11%   +0.03%     
==========================================
  Files         138      138              
  Lines       10572    10581       +9     
==========================================
+ Hits         6563     6572       +9     
  Misses       3484     3484              
  Partials      525      525              

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

@savitaashture savitaashture merged commit d928ce4 into openshift-pipelines:main Nov 14, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants