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(api,hooks): add v2 hook signature and github repository analysis #6255

Merged
merged 12 commits into from
Aug 26, 2022

Conversation

sguiheux
Copy link
Collaborator

  1. Description
  2. Related issues
  3. About tests
  4. Mentions

@ovh/cds

@sguiheux sguiheux marked this pull request as ready for review August 23, 2022 15:24
engine/api/v2_project.go Outdated Show resolved Hide resolved
Co-authored-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
engine/api/v2_repository_analyze.go Outdated Show resolved Hide resolved
engine/hooks/hooks_router.go Outdated Show resolved Hide resolved
engine/hooks/hooks_router.go Outdated Show resolved Hide resolved
engine/hooks/hooks_handlers.go Outdated Show resolved Hide resolved
}

// Create a new HMAC by defining the hash type and the key (as byte array)
h := hmac.New(sha256.New, []byte(hook.HookSignKey))
Copy link
Member

Choose a reason for hiding this comment

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

question: is it time consuming ?

Copy link
Collaborator Author

@sguiheux sguiheux Aug 25, 2022

Choose a reason for hiding this comment

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

the middleware: 35ms with a gitea event on a local environment

engine/api/repository/dao_vcs_project_repository.go Outdated Show resolved Hide resolved
engine/api/v2_project_repository.go Outdated Show resolved Hide resolved
engine/api/v2_repository_analyze.go Outdated Show resolved Hide resolved
@ovh-cds
Copy link
Collaborator

ovh-cds commented Aug 25, 2022

CDS Report build-all-cds#17801.0 ✘

  • Build
    • Build and Package All ✘
    • Build Debpacker ✔
    • Build OS-Ansible-Inventory ✔
    • Build SMTPMock ✔
    • Lint UI Translate ✔
    • Test CLI ✔
    • Test Engine ✔
    • Test SDK ✔
    • Test UI ✔

engine/api/operation/operation.go Outdated Show resolved Hide resolved
engine/api/rbac/dao_rbac_project_key.go Outdated Show resolved Hide resolved
engine/api/repository/dao_vcs_project_repository.go Outdated Show resolved Hide resolved
engine/api/user/dao_gpgkey.go Outdated Show resolved Hide resolved
engine/api/v2_repository_analyze.go Outdated Show resolved Hide resolved
engine/api/v2_repository_analyze.go Outdated Show resolved Hide resolved
engine/api/vcs/dao_vcs_project.go Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

44.1% 44.1% Coverage
0.0% 0.0% Duplication

@sguiheux sguiheux merged commit 458912c into master Aug 26, 2022
@sguiheux sguiheux deleted the hookSignatureV2 branch September 5, 2022 14:42
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.

None yet

5 participants