Skip to content

feat(api,hooks): add v2 hook signature and github repository analysis#6255

Merged
sguiheux merged 12 commits into
masterfrom
hookSignatureV2
Aug 26, 2022
Merged

feat(api,hooks): add v2 hook signature and github repository analysis#6255
sguiheux merged 12 commits into
masterfrom
hookSignatureV2

Conversation

@sguiheux

Copy link
Copy Markdown
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
Comment thread engine/api/v2_project.go Outdated
Co-authored-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
Comment thread engine/api/v2_repository_analyze.go Outdated
Comment thread engine/hooks/hooks_router.go Outdated
Comment thread engine/hooks/hooks_router.go Outdated
Comment thread engine/hooks/hooks_handlers.go Outdated
}

// 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
Copy Markdown
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 ?

@sguiheux sguiheux Aug 25, 2022

Copy link
Copy Markdown
Collaborator Author

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

Comment thread engine/api/repository/dao_vcs_project_repository.go Outdated
Comment thread engine/api/v2_project_repository.go Outdated
Comment thread engine/api/v2_repository_analyze.go Outdated
@ovh-cds

ovh-cds commented Aug 25, 2022

Copy link
Copy Markdown
Collaborator

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 ✔

Comment thread engine/api/operation/operation.go Outdated
Comment thread engine/api/rbac/dao_rbac_project_key.go Outdated
Comment thread engine/api/repository/dao_vcs_project_repository.go Outdated
Comment thread engine/api/repository/dao_vcs_project_repository_analyze.go Outdated
Comment thread engine/api/user/dao_gpgkey.go Outdated
Comment thread engine/api/v2_repository_analyze.go Outdated
Comment thread engine/api/v2_repository_analyze.go Outdated
Comment thread engine/api/vcs/dao_vcs_project.go Outdated
@sonarqubecloud

Copy link
Copy Markdown

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.

5 participants