settings:
  name: oss-fuzz
  repos:
    - https://github.com/google/oss-fuzz

collections:
  - id: Fuzzing Issues
    name: Fuzzing Issues
    dedup: true
    description: >
      Status of issues across oss-fuzz repos
    rules:
      # People who need a response
      - fuzz-issue-updated-support
      # fuzzing issues
      - fuzz-bugs
      - fuzz-priority
      # Issues needing reprioritization
      - fuzz-many-reactions
      - fuzz-many-commenters
      - fuzz-issue-zombies
        # People with questions
      - fuzz-issue-has-question
  - id: PRs - fuzzing
    name: OSS Fuzz PRs
    description: >
      Status of PRs in OSS-Fuzz
    rules:
      - prs-fuzz
      - fuzz-pr-approved-stale
      - fuzz-pr-unapproved-stale


rules:
  ### Pull requests

  prs-fuzz:
    name: "OSS Fuzz PRs"
    type: pull_request
    resolution: "Review requests or mark them as do-not-merge/work-in-progress"
    filters:
      - title: "!.*(WIP|wip).*"
      - tag: "!(changes-requested|draft|approved)"
    repos:
      - https://github.com/google/oss-fuzz

  # PR's needing closure
  fuzz-pr-approved-stale:
    name: "Pull requests: Approved and getting old"
    resolution: "Merge PR"
    type: pull_request
    filters:
      - label: "approved"
      - updated: +2d
      - responded: +1d
    repos:
      - https://github.com/google/oss-fuzz

  fuzz-pr-unapproved-stale:
    name: "Pull Requests: Stale"
    resolution: "Add comment and/or close PR"
    type: pull_request
    filters:
      - created: +3d
      - updated: +2d
      - responded: +1d
      - tag: "!draft"
    repos:
      - https://github.com/google/oss-fuzz

  pr-approved-stale:
    name: "Pull requests: Approved and getting old"
    resolution: "Merge PR"
    type: pull_request
    filters:
      - label: "approved"
      - updated: +5d
      - responded: +2d

  pr-unapproved-stale:
    name: "Pull Requests: Stale"
    type: pull_request
    resolution: "Add comment and/or close PR"
    filters:
      - created: +20d
      - updated: +5d
      - responded: +2d

  
  ### Fuzzing Issues

  fuzz-bugs:
    name: "Fuzzing bugs that have not been commented on for 6 months"
    resolution: "comment a status update"
    type: issue
    filters:
      - label: "bug"
      - responded: +180d
      - tag: "!member-last"
    repos:
      - https://github.com/google/oss-fuzz


  fuzz-priority:
    name: "Fuzzing priority issues that have not been commented on for 6 months"
    resolution: "comment a status update"
    type: issue
    filters:
      - label: "priority"
      - responded: +180d
      - tag: "!member-last"
    repos:
      - https://github.com/google/oss-fuzz


  fuzz-many-reactions:
    name: "many reactions, low priority"
    resolution: "Upgrade to priority"
    filters:
      - reactions: ">3"
      - reactions-per-month: ">0.75"
      - label: "!priority"
    repos:
      - https://github.com/google/oss-fuzz

  fuzz-many-commenters:
    name: "many commenters, low priority"
    resolution: "Upgrade to priority"
    filters:
      - commenters: ">2"
      - commenters-per-month: ">1.9"
      - created: "+30d"
      - label: "!priority"
    repos:
      - https://github.com/google/oss-fuzz

  fuzz-issue-zombies:
    name: "Screaming into the void"
    resolution: "Reopen, or ask folks to open a new issue"
    type: issue
    filters:
      - state: closed
      - updated: -7d
      - tag: recv
      - comments-while-closed: ">1"
    repos:
      - https://github.com/google/oss-fuzz

  # People with questions
  fuzz-issue-has-question:
    name: "Overdue answers for a question"
    resolution: "Add a comment"
    type: issue
    filters:
      - tag: recv-q
      - tag: "!member-last"
      - tag: "!contributor-last"
      - responded: +6d
    repos:
      - https://github.com/google/oss-fuzz

  fuzz-issue-updated-support:
    name: "Open support requests"
    resolution: "Add a comment"
    type: issue
    filters:
      - tag: recv
      - tag: "!member-last"
      - tag: "!contributor-last"
      - responded: +6d
    repos:
      - https://github.com/google/oss-fuzz
