Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/policies/assign-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: GitOps.PullRequestIssueManagement
description: Assign team-authored PRs to author
resource: repository

configuration:
resourceManagementConfiguration:
eventResponderTasks:
- if:
- payloadType: Pull_Request
- isAction:
action: Opened
- not:
activitySenderHasPermission:
permission: Read
then:
- assignTo:
author: True
description: Assign team PRs to author
97 changes: 97 additions & 0 deletions .github/policies/author-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: GitOps.PullRequestIssueManagement
description: Add and remove needs-author-action label to issues and PRs
resource: repository

configuration:
resourceManagementConfiguration:
eventResponderTasks:
- if:
- payloadType: Issues
- labelAdded:
label: needs-author-action
then:
- addReply:
reply: This issue has been marked `needs-author-action` and may be missing some important information.
description: Needs-author-action notification
- if:
- payloadType: Pull_Request_Review
- not:
activitySenderHasPermission:
permission: Read
- isAction:
action: Submitted
- isReviewState:
reviewState: Changes_requested
then:
- addLabel:
label: needs-author-action
description: PR reviews with "changes requested" applies the needs-author-action label
- if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: needs-author-action
- not:
hasLabel:
label: untriaged
- isOpen
then:
- addLabel:
label: needs-further-triage
- removeLabel:
label: needs-author-action
description: Replace `needs-author-action` label with `needs-further-triage` label when the author comments on an issue that is not still untriaged
- if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: needs-author-action
- hasLabel:
label: untriaged
- isOpen
then:
- removeLabel:
label: needs-author-action
description: Remove `needs-author-action` label when the author comments on an `untriaged` issue
- if:
- payloadType: Pull_Request
- isAction:
action: Synchronize
- hasLabel:
label: needs-author-action
then:
- removeLabel:
label: needs-author-action
description: Pushing changes to PR branch removes the needs-author-action label
- if:
- payloadType: Issue_Comment
- isActivitySender:
issueAuthor: True
- isAction:
action: Created
- hasLabel:
label: needs-author-action
- isOpen
then:
- removeLabel:
label: needs-author-action
description: Author commenting in PR removes the needs-author-action label
- if:
- payloadType: Pull_Request_Review
- isActivitySender:
issueAuthor: True
- hasLabel:
label: needs-author-action
- isAction:
action: Submitted
- isOpen
then:
- removeLabel:
label: needs-author-action
description: Author responding to a pull request review comment removes the needs-author-action label
49 changes: 49 additions & 0 deletions .github/policies/community-contrib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: GitOps.PullRequestIssueManagement
description: Label community PRs
resource: repository

configuration:
resourceManagementConfiguration:
eventResponderTasks:
- if:
- payloadType: Pull_Request
- isAction:
action: Opened
- and:
- not:
activitySenderHasPermission:
permission: Admin
- not:
activitySenderHasPermission:
permission: Write
- not:
activitySenderHasPermission:
permission: Write
- not:
isActivitySender:
user: github-actions[bot]
issueAuthor: False
- not:
isActivitySender:
user: dotnet-maestro[bot]
issueAuthor: False
- not:
isActivitySender:
user: dotnet-maestro-bot[bot]
issueAuthor: False
- not:
isActivitySender:
user: dotnet-maestro-bot
issueAuthor: False
- not:
isActivitySender:
user: dotnet-maestro
issueAuthor: False
- not:
isActivitySender:
user: github-actions
issueAuthor: False
then:
- addLabel:
label: community-contribution
description: Label community PRs
Loading