winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

moderatorTriggers.yml (24907B)


      1 id: moderatorTriggers
      2 name: GitOps.PullRequestIssueManagement
      3 description: Defines the users and permissions for the moderators
      4 owner:
      5 resource: repository
      6 disabled: false
      7 where:
      8 configuration:
      9   resourceManagementConfiguration:
     10     eventResponderTasks:
     11       - if:
     12           # If the activity sender is any one of the moderators, has Admin permission on the repo, or has Write permissions on the repo. . .
     13           - or:
     14               - activitySenderHasPermission:
     15                   permission: Admin
     16               - activitySenderHasPermission:
     17                   permission: Write
     18               - isActivitySender:
     19                   user: stephengillie
     20                   issueAuthor: False
     21               - isActivitySender:
     22                   user: ImJoakim
     23                   issueAuthor: False
     24               - isActivitySender:
     25                   user: ItzLevvie
     26                   issueAuthor: False
     27               - isActivitySender:
     28                   user: jedieaston
     29                   issueAuthor: False
     30               - isActivitySender:
     31                   user: KaranKad
     32                   issueAuthor: False
     33               - isActivitySender:
     34                   user: OfficialEsco
     35                   issueAuthor: False
     36               - isActivitySender:
     37                   user: quhxl
     38                   issueAuthor: False
     39               - isActivitySender:
     40                   user: Trenly
     41                   issueAuthor: False
     42               - isActivitySender:
     43                   user: mdanish-kh
     44                   issueAuthor: False
     45               - isActivitySender:
     46                   user: russellbanks
     47                   issueAuthor: False
     48         then:
     49           # If the payload is an issue_Comment or a Pull_Request_Review_Comment
     50           - if:
     51               - or:
     52                   - payloadType: Issue_Comment
     53                   - payloadType: Pull_Request_Review_Comment
     54             # Remove the Needs-Triage label
     55             # Take different actions based on the comment pattern
     56             then:
     57               - removeLabel:
     58                   label: Needs-Triage
     59               # Area-Accessibility
     60               - if:
     61                   - commentContains:
     62                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][aA]ccessibility'
     63                       isRegex: True
     64                 then:
     65                   - addLabel:
     66                       label: Area-Accessibility
     67               # Area-Architecture
     68               - if:
     69                   - commentContains:
     70                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][aA]rchitecture'
     71                       isRegex: True
     72                 then:
     73                   - addLabel:
     74                       label: Area-Architecture
     75               # Area-Build
     76               - if:
     77                   - commentContains:
     78                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][bB]uild'
     79                       isRegex: True
     80                 then:
     81                   - addLabel:
     82                       label: Area-Build
     83               # Area-COM-API
     84               - if:
     85                   - commentContains:
     86                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][cC][oO][mM][\s-][aA][pP][iI]'
     87                       isRegex: True
     88                 then:
     89                   - addLabel:
     90                       label: Area-COM-API
     91               # Area-External
     92               - if:
     93                   - commentContains:
     94                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][eE]xternal'
     95                       isRegex: True
     96                 then:
     97                   - addLabel:
     98                       label: Area-External
     99               # Area-GPO
    100               - if:
    101                   - commentContains:
    102                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][gG][pP][oO]'
    103                       isRegex: True
    104                 then:
    105                   - addLabel:
    106                       label: Area-GPO
    107               # Area-Input
    108               - if:
    109                   - commentContains:
    110                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][iI]nput'
    111                       isRegex: True
    112                 then:
    113                   - addLabel:
    114                       label: Area-Input
    115               # Area-Localization
    116               - if:
    117                   - commentContains:
    118                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][lL]ocalization'
    119                       isRegex: True
    120                 then:
    121                   - addLabel:
    122                       label: Area-Localization
    123               # Area-Manifest
    124               - if:
    125                   - commentContains:
    126                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][mM]anifest'
    127                       isRegex: True
    128                 then:
    129                   - addLabel:
    130                       label: Area-Manifest
    131               # Area-Matching
    132               - if:
    133                   - commentContains:
    134                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][mM]atching'
    135                       isRegex: True
    136                 then:
    137                   - addLabel:
    138                       label: Area-Matching
    139               # Area-Output
    140               - if:
    141                   - commentContains:
    142                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][oO]utput'
    143                       isRegex: True
    144                 then:
    145                   - addLabel:
    146                       label: Area-Output
    147               # Area-Path
    148               - if:
    149                   - commentContains:
    150                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][pP]ath'
    151                       isRegex: True
    152                 then:
    153                   - addLabel:
    154                       label: Area-Path
    155               # Area-Performance
    156               - if:
    157                   - commentContains:
    158                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][pP]erformance'
    159                       isRegex: True
    160                 then:
    161                   - addLabel:
    162                       label: Area-Performance
    163               # Area-Scope
    164               - if:
    165                   - commentContains:
    166                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][sS]cope'
    167                       isRegex: True
    168                 then:
    169                   - addLabel:
    170                       label: Area-Scope
    171               # Area-Settings
    172               - if:
    173                   - commentContains:
    174                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][sS]ettings'
    175                       isRegex: True
    176                 then:
    177                   - addLabel:
    178                       label: Area-Settings
    179               # Area-Sorting
    180               - if:
    181                   - commentContains:
    182                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][sS]orting'
    183                       isRegex: True
    184                 then:
    185                   - addLabel:
    186                       label: Area-Sorting
    187               # Area-User-Interface
    188               - if:
    189                   - commentContains:
    190                       pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][uU]ser[\s-][iI]nterface'
    191                       isRegex: True
    192                 then:
    193                   - addLabel:
    194                       label: Area-User-Interface
    195               # Blocking-Issue
    196               - if:
    197                   - commentContains:
    198                       pattern: '\[[Pp]olicy\]\s+[bB]locking[\s-][iI]ssue'
    199                       isRegex: True
    200                 then:
    201                   - removeLabel:
    202                       label: Needs-Author-Feedback
    203                   - removeLabel:
    204                       label: Needs-Attention
    205                   - addLabel:
    206                       label: Blocking-Issue
    207               # Breaking-Change
    208               - if:
    209                   - commentContains:
    210                       pattern: '\[[Pp]olicy\]\s+[bB]reaking[\s-][cC]hange'
    211                       isRegex: True
    212                 then:
    213                   - addLabel:
    214                       label: Breaking-Change
    215               # Command-Configure
    216               - if:
    217                   - commentContains:
    218                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][cC]onfigure'
    219                       isRegex: True
    220                 then:
    221                   - addLabel:
    222                       label: Command-Configure
    223               # Command-Download
    224               - if:
    225                   - commentContains:
    226                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][dD]ownload'
    227                       isRegex: True
    228                 then:
    229                   - addLabel:
    230                       label: Command-Download
    231               # Command-Export
    232               - if:
    233                   - commentContains:
    234                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][eE]xport'
    235                       isRegex: True
    236                 then:
    237                   - addLabel:
    238                       label: Command-Export
    239               # Command-Import
    240               - if:
    241                   - commentContains:
    242                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][iI]mport'
    243                       isRegex: True
    244                 then:
    245                   - addLabel:
    246                       label: Command-Import
    247               # Command-Install
    248               - if:
    249                   - commentContains:
    250                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][iI]nstall'
    251                       isRegex: True
    252                 then:
    253                   - addLabel:
    254                       label: Command-Install
    255               # Command-List
    256               - if:
    257                   - commentContains:
    258                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][lL]ist'
    259                       isRegex: True
    260                 then:
    261                   - addLabel:
    262                       label: Command-List
    263               # Command-Pin
    264               - if:
    265                   - commentContains:
    266                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][pP]in'
    267                       isRegex: True
    268                 then:
    269                   - addLabel:
    270                       label: Command-Pin
    271               # Command-Search
    272               - if:
    273                   - commentContains:
    274                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][sS]earch'
    275                       isRegex: True
    276                 then:
    277                   - addLabel:
    278                       label: Command-Search
    279               # Command-Show
    280               - if:
    281                   - commentContains:
    282                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][sS]how'
    283                       isRegex: True
    284                 then:
    285                   - addLabel:
    286                       label: Command-Show
    287               # Command-Source
    288               - if:
    289                   - commentContains:
    290                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][sS]ource'
    291                       isRegex: True
    292                 then:
    293                   - addLabel:
    294                       label: Command-Source
    295               # Command-Uninstall
    296               - if:
    297                   - commentContains:
    298                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][uU]ninstall'
    299                       isRegex: True
    300                 then:
    301                   - addLabel:
    302                       label: Command-Uninstall
    303               # Command-Upgrade
    304               - if:
    305                   - commentContains:
    306                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][uU]pgrade'
    307                       isRegex: True
    308                 then:
    309                   - addLabel:
    310                       label: Command-Upgrade
    311               # Command-Validate
    312               - if:
    313                   - commentContains:
    314                       pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][vV]alidate'
    315                       isRegex: True
    316                 then:
    317                   - addLabel:
    318                       label: Command-Validate
    319               # Context-Elevated-User
    320               - if:
    321                   - commentContains:
    322                       pattern: '\[[Pp]olicy\]\s+[cC]ontext[\s-][eE]levated([\s-][uU]ser)?'
    323                       isRegex: True
    324                 then:
    325                   - addLabel:
    326                       label: Context-Elevated-User
    327               # Context-User
    328               - if:
    329                   - commentContains:
    330                       pattern: '\[[Pp]olicy\]\s+[cC]ontext[\s-][uU]ser'
    331                       isRegex: True
    332                 then:
    333                   - addLabel:
    334                       label: Context-User
    335               # Context-System
    336               - if:
    337                   - commentContains:
    338                       pattern: '\[[Pp]olicy\]\s+[cC]ontext[\s-][sS]ystem'
    339                       isRegex: True
    340                 then:
    341                   - addLabel:
    342                       label: Context-System
    343               # Dependencies
    344               - if:
    345                   - commentContains:
    346                       pattern: '\[[Pp]olicy\]\s+[dD]ependencies'
    347                       isRegex: True
    348                 then:
    349                   - addLabel:
    350                       label: Dependencies
    351               # DSC-Resource
    352               - if:
    353                   - commentContains:
    354                       pattern: '\[[Pp]olicy\]\s+[dD][sS][cC][\s-][rR]esource'
    355                       isRegex: True
    356                 then:
    357                   - addLabel:
    358                       label: DSC-Resource
    359               # Experimental
    360               - if:
    361                   - commentContains:
    362                       pattern: '\[[Pp]olicy\]\s+[eE]xperimental'
    363                       isRegex: True
    364                 then:
    365                   - addLabel:
    366                       label: Experimental
    367               # Hardware
    368               - if:
    369                   - commentContains:
    370                       pattern: '\[[Pp]olicy\]\s+[hH]ardware'
    371                       isRegex: True
    372                 then:
    373                   - addLabel:
    374                       label: Hardware
    375               # Interactive-Only-Installer
    376               - if:
    377                   - commentContains:
    378                       pattern: '\[[Pp]olicy\]\s+[iI]nteractive[\s-][oO]nly([\s-][iI]nstaller)?'
    379                       isRegex: True
    380                 then:
    381                   - addLabel:
    382                       label: Interactive-Only-Installer
    383               # Issue-Bug
    384               - if:
    385                   - commentContains:
    386                       pattern: '\[[Pp]olicy\]\s+[iI]ssue[\s-][bB]ug'
    387                       isRegex: True
    388                 then:
    389                   - addLabel:
    390                       label: Issue-Bug
    391               # Issue-Docs
    392               - if:
    393                   - commentContains:
    394                       pattern: '\[[Pp]olicy\]\s+[iI]ssue[\s-][dD]ocs'
    395                       isRegex: True
    396                 then:
    397                   - addLabel:
    398                       label: Issue-Docs
    399               # Issue-Feature
    400               - if:
    401                   - commentContains:
    402                       pattern: '\[[Pp]olicy\]\s+[iI]ssue[\s-][fF]eature'
    403                       isRegex: True
    404                 then:
    405                   - addLabel:
    406                       label: Issue-Feature
    407               # msstore
    408               - if:
    409                   - commentContains:
    410                       pattern: '\[[Pp]olicy\]\s+[mM][sS][sS]tore'
    411                       isRegex: True
    412                 then:
    413                   - addLabel:
    414                       label: msstore
    415               # Needs-Attention
    416               - if:
    417                   - commentContains:
    418                       pattern: '\[[Pp]olicy\]\s+[Nn]eeds[\s-][Aa]ttention'
    419                       isRegex: True
    420                 then:
    421                   - addLabel:
    422                       label: Needs-Attention
    423               # Needs-Author-Feedback
    424               - if:
    425                   - commentContains:
    426                       pattern: '\[[Pp]olicy\]\s+[Nn]eeds[\s-][Aa]uthor[\s-][fF]eedback'
    427                       isRegex: True
    428                 then:
    429                   - addLabel:
    430                       label: Needs-Author-Feedback
    431               # Needs-Repro
    432               - if:
    433                   - commentContains:
    434                       pattern: '\[[Pp]olicy\]\s+[Nn]eeds[\s-][Rr]epro'
    435                       isRegex: True
    436                 then:
    437                   - addLabel:
    438                       label: Needs-Repro
    439               # Portable
    440               - if:
    441                   - commentContains:
    442                       pattern: '\[[Pp]olicy\]\s+[pP]ortable'
    443                       isRegex: True
    444                 then:
    445                   - addLabel:
    446                       label: Portable
    447               # PowerShell
    448               - if:
    449                   - commentContains:
    450                       pattern: '\[[Pp]olicy\]\s+[pP]ower[sS]hell'
    451                       isRegex: True
    452                 then:
    453                   - addLabel:
    454                       label: PowerShell
    455               # PSA
    456               - if:
    457                   - commentContains:
    458                       pattern: '\[[Pp]olicy\]\s+[Pp][Ss][Aa]'
    459                       isRegex: True
    460                 then:
    461                   - addLabel:
    462                       label: Public-Service-Announcement
    463               # Side-By-Side
    464               - if:
    465                   - commentContains:
    466                       pattern: '\[[Pp]olicy\]\s+[sS]ide[\s-][bB]y[\s-][sS]ide'
    467                       isRegex: True
    468                 then:
    469                   - addLabel:
    470                       label: Side-By-Side
    471               # Zipped-Binary
    472               - if:
    473                   - commentContains:
    474                       pattern: '\[[Pp]olicy\]\s+[zZ]ip(ped)?[\s-][bB]inary'
    475                       isRegex: True
    476                 then:
    477                   - addLabel:
    478                       label: Zipped-Binary
    479               # Zipped-Binary
    480               - if:
    481                   - commentContains:
    482                       pattern: '\[[Pp]olicy\]\s+([wW]indows[\s-])?[sS]andbox'
    483                       isRegex: True
    484                 then:
    485                   - addLabel:
    486                       label: Windows-Sandbox
    487               # Unblocked
    488               - if:
    489                   - commentContains:
    490                       pattern: '\[[Pp]olicy\]\s+[uU]nblocked'
    491                       isRegex: True
    492                 then:
    493                   - removeLabel:
    494                       label: Blocking-Issue
    495               # Duplicate of #
    496               - if:
    497                   - commentContains:
    498                       pattern: Duplicate\s+of\s+\#?\s*\d+
    499                       isRegex: True
    500                 then:
    501                   - addReply:
    502                       reply: >-
    503                         Hello @${issueAuthor},
    504 
    505 
    506                         We've identified this as a duplicate of another issue or PR that already exists. This specific instance is being closed in favor of the linked issue. Please add your 👍 to the other issue to raise its priority. Thanks for your contribution!
    507 
    508 
    509                         Template: msftbot/duplicate/closed
    510                   - closeIssue
    511                   - removeLabel:
    512                       label: Needs-Triage
    513                   - removeLabel:
    514                       label: Needs-Attention
    515                   - removeLabel:
    516                       label: Needs-Feedback-Hub
    517                   - removeLabel:
    518                       label: Needs-Author-Feedback
    519                   - addLabel:
    520                       label: Resolution-Duplicate
    521               # Close with reason <>;
    522               - if:
    523                   - commentContains:
    524                       pattern: "[cC]lose\\s+[wW]ith\\s+[rR]eason\\s*:[\\w\\s\\-\\(\\)\\[\\]\\{\\}\\\\\\/.+=@\\#$%&^*`~|'\",<>?]*(?=;)"
    525                       isRegex: True
    526                 then:
    527                   - closeIssue
    528                   - removeLabel:
    529                       label: Needs-Triage
    530                   - removeLabel:
    531                       label: Needs-Attention
    532                   - removeLabel:
    533                       label: Needs-Feedback-Hub
    534                   - removeLabel:
    535                       label: Needs-Author-Feedback
    536               # Reopen with reason <>;
    537               - if:
    538                   - commentContains:
    539                       pattern: "[rR]eopen\\s+[wW]ith\\s+[rR]eason\\s*:[\\w\\s\\-\\(\\)\\[\\]\\{\\}\\\\\\/.+=@\\#$%&^*`~|'\",<>?]*(?=;)"
    540                       isRegex: True
    541                 then:
    542                   - reopenIssue
    543                   - removeLabel:
    544                       label: Resolution-Duplicate
    545                   - removeLabel:
    546                       label: No-Recent-Activity
    547               # Reset-Feedback
    548               - if:
    549                   - commentContains:
    550                       pattern: '\[[Pp]olicy\]\s+[rR]eset\s+[fF]eedback'
    551                       isRegex: True
    552                 then:
    553                   - removeLabel:
    554                       label: Needs-Author-Feedback
    555                   - removeLabel:
    556                       label: Needs-Attention
    557               # Reset-Labels
    558               - if:
    559                   - commentContains:
    560                       pattern: '\[[Pp]olicy\]\s+[rR]eset\s+[lL]abels'
    561                       isRegex: True
    562                 then:
    563                   - removeLabel:
    564                       label: Area-Accessibility
    565                   - removeLabel:
    566                       label: Area-Architecture
    567                   - removeLabel:
    568                       label: Area-Build
    569                   - removeLabel:
    570                       label: Area-COM-API
    571                   - removeLabel:
    572                       label: Area-External
    573                   - removeLabel:
    574                       label: Area-GPO
    575                   - removeLabel:
    576                       label: Area-Input
    577                   - removeLabel:
    578                       label: Area-Localization
    579                   - removeLabel:
    580                       label: Area-Manifest
    581                   - removeLabel:
    582                       label: Area-Matching
    583                   - removeLabel:
    584                       label: Area-Output
    585                   - removeLabel:
    586                       label: Area-Path
    587                   - removeLabel:
    588                       label: Area-Performance
    589                   - removeLabel:
    590                       label: Area-Scope
    591                   - removeLabel:
    592                       label: Area-Settings
    593                   - removeLabel:
    594                       label: Area-Sorting
    595                   - removeLabel:
    596                       label: Area-User-Interface
    597                   - removeLabel:
    598                       label: Blocking-Issue
    599                   - removeLabel:
    600                       label: Breaking-Change
    601                   - removeLabel:
    602                       label: Command-Configure
    603                   - removeLabel:
    604                       label: Command-Download
    605                   - removeLabel:
    606                       label: Command-Export
    607                   - removeLabel:
    608                       label: Command-Import
    609                   - removeLabel:
    610                       label: Command-Install
    611                   - removeLabel:
    612                       label: Command-List
    613                   - removeLabel:
    614                       label: Command-Pin
    615                   - removeLabel:
    616                       label: Command-Search
    617                   - removeLabel:
    618                       label: Command-Show
    619                   - removeLabel:
    620                       label: Command-Source
    621                   - removeLabel:
    622                       label: Command-Uninstall
    623                   - removeLabel:
    624                       label: Command-Upgrade
    625                   - removeLabel:
    626                       label: Command-Validate
    627                   - removeLabel:
    628                       label: Context-Elevated-User
    629                   - removeLabel:
    630                       label: Context-User
    631                   - removeLabel:
    632                       label: Context-System
    633                   - removeLabel:
    634                       label: Dependencies
    635                   - removeLabel:
    636                       label: DSC-Resource
    637                   - removeLabel:
    638                       label: Experimental
    639                   - removeLabel:
    640                       label: Hardware
    641                   - removeLabel:
    642                       label: In-PR
    643                   - removeLabel:
    644                       label: Interactive-Only-Installer
    645                   - removeLabel:
    646                       label: Issue-Bug
    647                   - removeLabel:
    648                       label: Issue-Docs
    649                   - removeLabel:
    650                       label: Issue-Feature
    651                   - removeLabel:
    652                       label: msstore
    653                   - removeLabel:
    654                       label: Needs-Attention
    655                   - removeLabel:
    656                       label: Needs-Author-Feedback
    657                   - removeLabel:
    658                       label: Portable
    659                   - removeLabel:
    660                       label: PowerShell
    661                   - removeLabel:
    662                       label: Public-Service-Announcement
    663                   - removeLabel:
    664                       label: Side-By-Side
    665                   - removeLabel:
    666                       label: Windows-Sandbox
    667                   - removeLabel:
    668                       label: Zipped-Binary
    669 onFailure:
    670 onSuccess: