Skip to content

Hackbot did not respond to ni when the ni was part of the bug creation #7226

Closed

Description

@mayankleoboy

https://bugzilla.mozilla.org/show_bug.cgi?id=2083263#c0

I opened a new bug and in the first comment itself, I ni'd hackbot.
The bot never responded back. It should have.

Activity

  1. ayoubdiourin7 commented on Oct 18, 2026

    @ayoubdiourin7
    Contributor

    I reproduced this on bugzilla-dev. The issue comes from the webhook BMO sends when a needinfo is set at bug creation: the payload doesn't include the new flag.

    Here is the webhook we received (trimmed):

    {
      "bug": {
        "id": 1855653,
        "is_private": false,
        "flags": []
      },
      "event": {
        "action": "modify",
        "routing_key": "bug.modify:flag.needinfo",
        "target": "bug",
        "changes": [
          {
            "field": "flag.needinfo",
            "added": "? (hackbot@mozilla.tld)",
            "removed": ""
          }
        ]
      }
    }

    event.changes has the needinfo request, but bug.flags is empty. Our code needs that list to get the needinfo flag ID:

    matching_flags = [
    flag
    for flag in bug["flags"]
    if flag["name"] == "needinfo"
    and flag["value"] == "?"
    and "requestee" in flag
    and flag["requestee"]["login"] == bot_login
    ]
    if not matching_flags:
    return None
    # BMO returns flags ordered by ID, so a newly requested needinfo is the
    # last matching flag in the webhook's current bug snapshot.
    flag_id = matching_flags[-1]["id"]

    With no matching flag, the nd is ignored

  2. ayoubdiourin7 commented on Oct 18, 2026

    @ayoubdiourin7
    Contributor
  3. ayoubdiourin7 commented on Oct 20, 2026

    @ayoubdiourin7
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Fields

Priority

None yet

Effort

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions