镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Renaming issues/PRs incorrectly changes awaiting change review and awaiting merge to awaiting review #556

Closed

Description

@arhadthedev

While changing bpo- to gh- I noticed that Bedevere makes forbidden transitions in response:

According to README, awaiting review has no incoming conditions:

flowchart TD
    A([Published PR]):::creator
    A_draft([New Draft PR]):::creator
    A_draft -- publish draft by contributor --> A:::creator
    A -- by contributor --> B[Awaiting review]:::anyone
    A -- by core dev --> C[Awaiting core review]:::coredev
    B & C -- new review by\nanother contributor --> C
    C & B & E  -- new core review\nrequests changes --> D[Awaiting changes]:::creator
    D -- changes by contributor --> E[Awaiting change review]:::coredev
    C & E & B -- new core review\napproves ---> F[Awaiting merge]:::coredev
    G[When a review is dismissed\nthe highest remaining state is restored\nbased on the remaining reviews]
classDef creator stroke:#CC0;
classDef anyone stroke:#00C;
classDef coredev stroke:#0C0;
classDef triager stroke:#C0C;
linkStyle 0,1,7 stroke:#CC0,color:auto;
linkStyle 2,3 stroke:#00C,color:auto;
linkStyle 4,5,6,8,9,10 stroke:#0C0,color:auto;
Loading

I suspect the bug is here, in a handler of PR/issue modifications introduced in gh-555:

bedevere/bedevere/stage.py

Lines 127 to 131 in 0f350ce

if pull_request.get("draft"):
await _remove_stage_labels(gh, issue)
else:
blocked_on = Blocker.core_review if await util.is_core_dev(gh, username) else Blocker.review
await stage(gh, issue, blocked_on)

We need to check whether assignment of Blocker.core_review or Blocker.review is allowed before executing the else branch.

Ideally (for some distant future) we need to move tag management into a separate .py file that reads existing tags, checks if a new one is applicable, and removes the old ones. However, I have no free time to do it currently (because it requires massive modification of both reactors and their tests).

cc @itamaro

Activity

  1. itamaro commented on May 6, 2023

    @itamaro
    Contributor

    oops, you're right, this handler is doing way more than it was intended!
    that handler should respond only to PR edits that change the PR from draft to published or from published to draft.

  2. arhadthedev commented on May 6, 2023

    @arhadthedev
    MemberAuthor

    @itamaro Could you submit a PR, please?

  3. added a commit that references this issue on May 6, 2023
  4. itamaro commented on May 6, 2023

    @itamaro
    Contributor

    @itamaro Could you submit a PR, please?

    of course

  5. added a commit that references this issue on May 10, 2023
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions