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

Revert "Add logging to debug bedevere label staging (#594)" #595

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions bedevere/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from . import backport, gh_issue, close_pr, filepaths, news, stage

import sentry_sdk
import logging


router = routing.Router(backport.router, gh_issue.router, close_pr.router,
filepaths.router, news.router,
Expand All @@ -26,7 +24,6 @@
sentry_sdk.init(os.environ.get("SENTRY_DSN"))

async def main(request):
logging.basicConfig(level=logging.DEBUG)
try:
body = await request.read()
secret = os.environ.get("GH_SECRET")
Expand Down
5 changes: 0 additions & 5 deletions bedevere/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import enum
import random
import logging

import gidgethub.routing

Expand Down Expand Up @@ -94,7 +93,6 @@ async def _remove_stage_labels(gh, issue):

async def stage(gh, issue, blocked_on):
"""Remove any "awaiting" labels and apply the specified one."""
logging.info("Staging: issue %s, Issue labels: %s, blocked on: %s", issue["number"], issue["labels"], blocked_on.value)
label_name = blocked_on.value
if any(label_name == label["name"] for label in issue["labels"]):
return
Expand Down Expand Up @@ -190,7 +188,6 @@ async def new_review(event, gh, *args, **kwargs):
review = event.data["review"]
reviewer = util.user_login(review)
state = review["state"].lower()
logging.info("PR# %s Review submitted by %s", pull_request["number"], reviewer, )
if state == "commented":
# Don't care about comment reviews.
return
Expand All @@ -202,13 +199,11 @@ async def new_review(event, gh, *args, **kwargs):
return
else:
# Waiting for a core developer to leave a review.
logging.info("PR# %s, Review by non core developer, adding awaiting core review %s", pull_request["number"], reviewer )
await stage(
gh, await util.issue_for_PR(gh, pull_request), Blocker.core_review
)
else:
if state == "approved":
logging.info("PR# %s approved by core dev: %s", pull_request["number"], reviewer)
if pull_request["state"] == "open":
await stage(
gh, await util.issue_for_PR(gh, pull_request), Blocker.merge
Expand Down
Loading