Skip to content

Commit 2e4cb75

Browse files
Merge pull request #685 from Azure/mattchenderson/automations
Adding workflow automations
2 parents d2f0064 + 2485bbd commit 2e4cb75

13 files changed

+431
-39
lines changed

.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
labels: ["potential-bug", "feature: api-description"]
4+
body:
5+
- id: hint
6+
type: markdown
7+
attributes:
8+
value: This project is in maintenance mode and will receive no further feature updates. See https://github.com/Azure/azure-functions-openapi-extension/issues/683 for more information. **Please use this template only for reporting bugs.** Issues opened for new feature requests will be closed.
9+
- id: description
10+
type: textarea
11+
attributes:
12+
label: Description
13+
placeholder: Please provide a succinct description of the issue.
14+
validations:
15+
required: true
16+
- id: repro
17+
type: textarea
18+
attributes:
19+
label: Steps to reproduce
20+
placeholder: Please provide the steps required to reproduce the problem.
21+
validations:
22+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions
4+
url: https://aka.ms/azure-functions/questions-and-answers
5+
about: Please ask and answer questions using Microsoft Q&A.

.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@
22
name: Pull request
33
about: Create a pull request
44
title: Pull request
5-
labels: ''
5+
labels: 'feature: api-description'
66
assignees: ''
77
---
88

9-
Related to #{issue_number}.
9+
<!-- This project is in maintenance mode and will receive no further feature updates. See https://github.com/Azure/azure-functions-openapi-extension/issues/683 for more information. Pull requests adding new features will be closed. -->
1010

11-
**Changes proposed in this pull request**:
11+
### Issue describing the changes in this PR
1212

13-
* ...
14-
* ...
15-
* ...
13+
resolves #issue_for_this_pr
1614

17-
**Screenshots**
18-
If applicable, add screenshots to help explain your pull request.
15+
### Pull request checklist
16+
17+
* [ ] My changes **do not** add features
18+
* [ ] I have added all required tests (Unit tests, E2E tests)
19+
20+
<!-- Optional: delete if not applicable -->
21+
### Additional information
22+
23+
Additional PR information
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Add no recent activity
2+
description: Takes action to handle issues with no recent activity
3+
resource: repository
4+
configuration:
5+
resourceManagementConfiguration:
6+
scheduledSearches:
7+
- description: Add no recent activity label to issues
8+
frequencies:
9+
- hourly:
10+
hour: 3
11+
filters:
12+
- isIssue
13+
- isOpen
14+
- hasLabel:
15+
label: 'Needs: Author Feedback'
16+
- noActivitySince:
17+
days: 4
18+
- isNotLabeledWith:
19+
label: no-recent-activity
20+
actions:
21+
- addLabel:
22+
label: no-recent-activity
23+
- addReply:
24+
reply: |-
25+
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
26+
27+
If you are not the original author (${issueAuthor}) and believe this issue is not stale, please comment with `/bot not-stale` and I will not close it.
28+
onFailure:
29+
onSuccess:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Close duplicate issues
2+
description: Close duplicate issues
3+
resource: repository
4+
configuration:
5+
resourceManagementConfiguration:
6+
scheduledSearches:
7+
- description: Close duplicate issues
8+
frequencies:
9+
- hourly:
10+
hour: 3
11+
filters:
12+
- isIssue
13+
- isOpen
14+
- hasLabel:
15+
label: duplicate
16+
- noActivitySince:
17+
days: 3
18+
actions:
19+
- addReply:
20+
reply: This issue has been marked as duplicate and has not had any activity for **3 days**. It will be closed for housekeeping purposes.
21+
- closeIssue
22+
onFailure:
23+
onSuccess:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Close stale issues
2+
description: Action to handle stale issues
3+
resource: repository
4+
configuration:
5+
resourceManagementConfiguration:
6+
scheduledSearches:
7+
- description: Close stale issues
8+
frequencies:
9+
- hourly:
10+
hour: 3
11+
filters:
12+
- isIssue
13+
- isOpen
14+
- hasLabel:
15+
label: 'Needs: Author Feedback'
16+
- hasLabel:
17+
label: no-recent-activity
18+
- noActivitySince:
19+
days: 3
20+
- isNotLabeledWith:
21+
label: 'bot: do not close'
22+
actions:
23+
- closeIssue
24+
onFailure:
25+
onSuccess:
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Flag for triage
2+
description: Add triage labels and default assignments to issues
3+
resource: repository
4+
configuration:
5+
resourceManagementConfiguration:
6+
eventResponderTasks:
7+
8+
- description: Add needs triage label to new issues
9+
if:
10+
- payloadType: Issues
11+
- and:
12+
- isAction:
13+
action: Opened
14+
- not:
15+
isAssignedToSomeone
16+
then:
17+
- addLabel:
18+
label: 'Needs: Triage (Functions)'
19+
20+
- description: Add needs attention label to reopened issues
21+
if:
22+
- payloadType: Issues
23+
- and:
24+
- isAction:
25+
action: Reopened
26+
- not:
27+
hasLabel: 'Needs: Attention :wave:'
28+
then:
29+
- addLabel:
30+
label: 'Needs: Attention :wave:'
31+
32+
- description: Assign issues when marked for triage or when attention needed again
33+
if:
34+
- payloadType: Issues
35+
- isAction:
36+
action: Labeled
37+
- not:
38+
isAssignedToSomeone
39+
- or:
40+
- labelAdded:
41+
label: 'Needs: Triage (Functions)'
42+
- labelAdded:
43+
label: 'Needs: Attention :wave:'
44+
then:
45+
- assignIcmUsers:
46+
teamId: 114785
47+
primary: true
48+
secondary: false
49+
triggerOnOwnActions: true
50+
51+
onFailure:
52+
onSuccess:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Prevent auto-close
2+
description: Prevents issue from being closed by the automation
3+
resource: repository
4+
configuration:
5+
resourceManagementConfiguration:
6+
eventResponderTasks:
7+
- description: Prevents issue from being closed by the automation
8+
if:
9+
- payloadType: Issue_Comment
10+
- or :
11+
- isAction:
12+
action: Created
13+
- isAction:
14+
action: Edited
15+
- commentContains:
16+
pattern: /bot not-stale
17+
isRegex: False
18+
- and:
19+
- hasLabel:
20+
label: 'Needs: Author Feedback'
21+
- hasLabel:
22+
label: no-recent-activity
23+
- not:
24+
hasLabel: 'bot: do not close'
25+
then:
26+
- addLabel:
27+
label: 'bot: do not close'
28+
- addLabel:
29+
label: 'Needs: Attention :wave:'
30+
- addReply:
31+
reply: Thank you ${contextualAuthor}. This issue will not be automatically closed and a member of the team will review it soon.
32+
onFailure:
33+
onSuccess:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Remove needs author feedback label.
2+
description: Remove needs author feedback label and adds needs attention
3+
resource: repository
4+
configuration:
5+
resourceManagementConfiguration:
6+
eventResponderTasks:
7+
- description: Remove needs author feedback label. Add needs attention
8+
if:
9+
- payloadType: Issue_Comment
10+
- isAction:
11+
action: Created
12+
- isActivitySender:
13+
issueAuthor: True
14+
- hasLabel:
15+
label: 'Needs: Author Feedback'
16+
then:
17+
- if:
18+
- isOpen
19+
then:
20+
- addLabel:
21+
label: 'Needs: Attention :wave:'
22+
- removeLabel:
23+
label: 'Needs: Author Feedback'
24+
onFailure:
25+
onSuccess:
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Remove triage labels on close
2+
description: Removes "needs:*" labels from closed issues
3+
resource: repository
4+
configuration:
5+
resourceManagementConfiguration:
6+
eventResponderTasks:
7+
8+
- description: Remove needs triage label from closed issues
9+
if:
10+
- payloadType: Issues
11+
- isAction:
12+
action: Closed
13+
- hasLabel:
14+
label: 'Needs: Triage (Functions)'
15+
then:
16+
- removeLabel:
17+
label: 'Needs: Triage (Functions)'
18+
triggerOnOwnActions: true
19+
20+
- description: Remove needs attention label from closed issues
21+
if:
22+
- payloadType: Issues
23+
- isAction:
24+
action: Closed
25+
- hasLabel:
26+
label: 'Needs: Attention :wave:'
27+
then:
28+
- removeLabel:
29+
label: 'Needs: Attention :wave:'
30+
triggerOnOwnActions: true
31+
32+
- description: Remove needs author feedback label from closed issues
33+
if:
34+
- payloadType: Issues
35+
- isAction:
36+
action: Closed
37+
- hasLabel:
38+
label: 'Needs: Author Feedback'
39+
then:
40+
- removeLabel:
41+
label: 'Needs: Author Feedback'
42+
triggerOnOwnActions: true
43+
44+
onFailure:
45+
onSuccess:
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Remove no recent activity label
2+
description: Remove no recent activity label when issue is commented on
3+
resource: repository
4+
configuration:
5+
resourceManagementConfiguration:
6+
eventResponderTasks:
7+
- description: Remove no recent activity label when issue is commented on
8+
if:
9+
- payloadType: Issue_Comment
10+
- isAction:
11+
action: Created
12+
- hasLabel:
13+
label: no-recent-activity
14+
then:
15+
- removeLabel:
16+
label: no-recent-activity
17+
onFailure:
18+
onSuccess:

0 commit comments

Comments
 (0)