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

Use get_branch in get_behind_by instead of get_branches #79

Merged
merged 3 commits into from
Aug 30, 2023

Conversation

joseph-sentry
Copy link
Contributor

This PR changes get_behind_by to use get_branch instead of get_branches because of a GH API rate limiting issue.

Instead of listing all branches in a repo via the API we now fetch only the one we are looking for, in this case the base branch of an open PR.

This commit also makes changes to the requirements by updating shared to the latest version in order to use get_branch.

Changes had to be made to existing integration tests as they we re-run, cassettes were updated.

This commit changes get_behind_by to use get_branch instead
of get_branches because of a GH API rate limiting issue.

Instead of listing all branches in a repo via the API we now
fetch only the one we are looking for, in this case the base
branch of an open PR.

This commit also makes changes to the requirements by updating
shared to the latest version in order to use get_branch.

Changes had to be made to existing integration tests as they
we re-run, cassettes were updated.

Signed-off-by: joseph-sentry <[email protected]>
Signed-off-by: joseph-sentry <[email protected]>
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #79 (3de08dc) into main (9f41bc2) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
- Coverage   98.59%   98.53%   -0.07%     
==========================================
  Files         359      359              
  Lines       26333    26336       +3     
==========================================
- Hits        25963    25949      -14     
- Misses        370      387      +17     
Flag Coverage Δ
integration 98.50% <100.00%> (-0.07%) ⬇️
latest-uploader-overall 98.50% <100.00%> (-0.07%) ⬇️
onlysomelabels 98.53% <100.00%> (-0.07%) ⬇️
unit 98.50% <100.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 97.27% <100.00%> (-0.03%) ⬇️
OutsideTasks 98.25% <100.00%> (-0.10%) ⬇️
Files Changed Coverage Δ
services/comparison/__init__.py 98.73% <100.00%> (+0.01%) ⬆️
services/comparison/tests/unit/test_behind_by.py 100.00% <100.00%> (ø)
...cation/notifiers/tests/integration/test_comment.py 92.17% <100.00%> (-7.83%) ⬇️
.../notification/notifiers/tests/unit/test_comment.py 100.00% <100.00%> (ø)
tasks/tests/integration/test_notify_task.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Related Entrypoints
run/app.tasks.notify.Notify

Signed-off-by: joseph-sentry <[email protected]>
@joseph-sentry joseph-sentry merged commit 34540e4 into main Aug 30, 2023
9 of 12 checks passed
@joseph-sentry joseph-sentry deleted the joseph/fix-get-behind-by branch August 30, 2023 20:00
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

2 participants