resource_rules:

issues:
  rules:
    - name: Comment 1 week old, unlabelled issues
      conditions:
        date:
          attribute: created_at
          condition: older_than
          interval_type: weeks
          interval: 1
        labels:
          - None
        state: opened
      actions:
        comment: |
          This issue has been open for one week and is unlabelled
  summaries:
    - name: Newest and oldest issues summary
      actions:
        summarize:
          title: "Newest and oldest {{type}} summary"
          summary: |
            Please triage the following {{type}}:

            {{items}}

            Please take care of them before the end of #{7.days.from_now.strftime('%Y-%m-%d')}

            /label ~"needs attention"
      rules:
        - name: New issues
          conditions:
            state: opened
          limits:
            most_recent: 2
          actions:
            summarize:
              item: "- [ ] [{{title}}]({{web_url}}) {{labels}}"
              summary: "Please triage the following new {{type}}:\n\n{{items}}"
        - name: Old issues
          conditions:
            state: opened
          limits:
            oldest: 2
          actions:
            summarize:
              item: "- [ ] [{{title}}]({{web_url}}) {{labels}}"
              summary: "Please triage the following old {{type}}:\n\n{{items}}"
merge_requests:
  rules:
    []