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

enhance(webhook): handle repository transfer events #883

Merged
merged 5 commits into from
Jun 20, 2023

Conversation

ecrupper
Copy link
Contributor

Closes go-vela/community#683

Also fixed a bug where the secrets weren't actually getting transferred because we were searching for secrets belonging to the new repo name, rather than the old.

Also added a util function to split the full name of a repo to its org and repo respectively since that was used twice.

@ecrupper ecrupper requested a review from a team as a code owner June 12, 2023 19:09
@ecrupper ecrupper self-assigned this Jun 12, 2023
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #883 (8853444) into main (ef7d338) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #883      +/-   ##
==========================================
+ Coverage   71.45%   71.47%   +0.02%     
==========================================
  Files         304      304              
  Lines       12436    12436              
==========================================
+ Hits         8886     8889       +3     
+ Misses       3118     3116       -2     
+ Partials      432      431       -1     
Impacted Files Coverage Δ
router/middleware/perm/perm.go 58.74% <100.00%> (+0.12%) ⬆️
scm/github/webhook.go 85.88% <100.00%> (+0.20%) ⬆️

@KellyMerrick KellyMerrick changed the title enhance(webhook): handle repsository transfer events enhance(webhook): handle repository transfer events Jun 12, 2023
KellyMerrick
KellyMerrick previously approved these changes Jun 13, 2023
Copy link
Contributor

@KellyMerrick KellyMerrick left a comment

Choose a reason for hiding this comment

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

lgtm

"owner": {
"from": {
"user": {
"login": "Old-Codertocat",
Copy link
Contributor

Choose a reason for hiding this comment

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

are these supposed to be octocat?

api/webhook/post.go Outdated Show resolved Hide resolved
@ecrupper
Copy link
Contributor Author

This will have to wait on the server-side changes of worker visibility: #772 for the tests to pass

api/webhook/post.go Outdated Show resolved Hide resolved
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.

Handle Repository Transfer in Vela
5 participants