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

Support Branch renaming #35

Open
1 task
aj-codecov opened this issue Jul 14, 2023 · 0 comments
Open
1 task

Support Branch renaming #35

aj-codecov opened this issue Jul 14, 2023 · 0 comments

Comments

@aj-codecov
Copy link
Collaborator

aj-codecov commented Jul 14, 2023

From Terry: https://codecovio.atlassian.net/browse/CODE-3581

Customer driven feature request

We are not listening for new branch names and updating our DB to show the correct information. After talking with Scott + Joe we do not seem to have an existing webhook to listen for this event. How will this impact the timeseries DB?

Current Behavior:
When renaming a branch Codecov looses the history of the branch and only displays data post rename. The old branch name appears as another branch (instead of being renamed) so it’s data lingers in branch lists.

Expected behavior:

Using a webhook to listen for the equivalent of a rename event and update our database with the new branch name so historical data is not lost/duplicated. Batching this update might be good as some branches could have years of commit history.

AJ Notes from chat with Joe:
When a branch is renamed:

GH repo hook PUSH that gives us an object_ref change - it says X commit is now on Y branch

GH repo hook PUSH on old branch moving ref for old branch name from what it was to nothing at all

GH repo create event for new branch

GH delete on old branch name

https://github.com/codecov/codecov-api/blob/master/webhook_handlers/views/github.py#L204

In this^ WH we need: IF branch AND IF branch name deleted=TRUE OR branch name created=TRUE THEN move all the things from old_branch to new_branch

Tasks

Preview Give feedback
  1. 0 of 1
    P2: stretch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Solution Discovery
Development

No branches or pull requests

1 participant