Skip to content

Bedevere shouldn't add "awaiting review" label on draft PRs #554

Closed

Description

@itamaro

I noticed that when opening draft PRs on the cpython repo, Bedevere still goes ahead and adds the "awaiting review" label.
I don't want to spam with review requests for PRs that are not ready for review (hence "draft"), so I'd like to suggest modifying the state machine to acknowledge the draft state (e.g. don't add any labels until the PR is published).

Activity

  1. itamaro commented on May 1, 2023

    @itamaro
    ContributorAuthor

    I'm happy to try to make this change myself (maybe with some guidance as I never touched this codebase before :) )

  2. Mariatta commented on May 1, 2023

    @Mariatta
    Member

    I think the main change is on here:

    https://github.com/python/bedevere/blob/main/bedevere/stage.py#L104
    Here, we're handling the "pull_request.opened" webhook event, and apply either the awaiting review or awaiting core review label.

    Since the webhook event sends the draft status as True or False, we can use that to determine whether or not we should apply the label when the PR is opened.

    if event.data["draft"] is False:
    # apply label
    

    We should also add apply the label when the PR was changed from draft to ready to review. So we may need to add the decorator @router.register("pull_request", action="edited").

  3. Mariatta commented on May 1, 2023

    @Mariatta
    Member

    And I guess we should also handle the situation when the PR was changed from "ready to review" back to the "draft" state.

  4. added 2 commits that reference this issue on May 1, 2023
  5. added a commit that references this issue on Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions