Skip to content

Conversation

@ecrupper
Copy link
Contributor

Closes go-vela/community#586

With the defer function being declared before the nil build check, any repository event was resulting in an error since there was no repo_id in the hook object. Also, cleaning up the repository renaming code by adding the event_action field to hook.

@ecrupper ecrupper requested a review from a team as a code owner May 18, 2022 16:30
@ecrupper ecrupper self-assigned this May 18, 2022
@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #641 (54d202a) into master (68ad2a1) will decrease coverage by 0.15%.
The diff coverage is 3.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #641      +/-   ##
==========================================
- Coverage   55.36%   55.21%   -0.16%     
==========================================
  Files         195      195              
  Lines       15827    15867      +40     
==========================================
- Hits         8763     8761       -2     
- Misses       6695     6737      +42     
  Partials      369      369              
Impacted Files Coverage Δ
api/webhook.go 0.00% <0.00%> (ø)
scm/github/webhook.go 87.18% <100.00%> (-0.07%) ⬇️

@wass3r wass3r changed the title fix(hook/webhook): clean up rename repo code with EventAction and shift defer func fix(hook/webhook)!: clean up rename repo code with EventAction and shift defer func May 19, 2022
cognifloyd
cognifloyd previously approved these changes May 19, 2022
Copy link
Member

@cognifloyd cognifloyd left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@jbrockopp jbrockopp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@wass3r wass3r left a comment

Choose a reason for hiding this comment

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

should be in v0.14 - we'll have to update the migrations utility

@wass3r wass3r merged commit 5a7342b into master May 27, 2022
@wass3r wass3r deleted the fix/hook-updates-no-repo branch May 27, 2022 16:58
@wass3r
Copy link
Collaborator

wass3r commented May 27, 2022

added to migration utility PR: go-vela/community@04d422a

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.

Database update hook errors on repository events

5 participants