Skip to content

Adding workflow automations #685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2025
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
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md

This file was deleted.

22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Bug Report
description: Create a report to help us improve
labels: ["potential-bug", "feature: api-description"]
body:
- id: hint
type: markdown
attributes:
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.
- id: description
type: textarea
attributes:
label: Description
placeholder: Please provide a succinct description of the issue.
validations:
required: true
- id: repro
type: textarea
attributes:
label: Steps to reproduce
placeholder: Please provide the steps required to reproduce the problem.
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Questions
url: https://aka.ms/azure-functions/questions-and-answers
about: Please ask and answer questions using Microsoft Q&A.
21 changes: 13 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
name: Pull request
about: Create a pull request
title: Pull request
labels: ''
labels: 'feature: api-description'
assignees: ''
---

Related to #{issue_number}.
<!-- 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. -->

**Changes proposed in this pull request**:
### Issue describing the changes in this PR

* ...
* ...
* ...
resolves #issue_for_this_pr

**Screenshots**
If applicable, add screenshots to help explain your pull request.
### Pull request checklist

* [ ] My changes **do not** add features
* [ ] I have added all required tests (Unit tests, E2E tests)

<!-- Optional: delete if not applicable -->
### Additional information

Additional PR information
29 changes: 29 additions & 0 deletions .github/policies/issue.add-no-recent-activity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Add no recent activity
description: Takes action to handle issues with no recent activity
resource: repository
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: Add no recent activity label to issues
frequencies:
- hourly:
hour: 3
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- noActivitySince:
days: 4
- isNotLabeledWith:
label: no-recent-activity
actions:
- addLabel:
label: no-recent-activity
- addReply:
reply: |-
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**.

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.
onFailure:
onSuccess:
23 changes: 23 additions & 0 deletions .github/policies/issue.close-duplicate-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Close duplicate issues
description: Close duplicate issues
resource: repository
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: Close duplicate issues
frequencies:
- hourly:
hour: 3
filters:
- isIssue
- isOpen
- hasLabel:
label: duplicate
- noActivitySince:
days: 3
actions:
- addReply:
reply: This issue has been marked as duplicate and has not had any activity for **3 days**. It will be closed for housekeeping purposes.
- closeIssue
onFailure:
onSuccess:
25 changes: 25 additions & 0 deletions .github/policies/issue.close-stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Close stale issues
description: Action to handle stale issues
resource: repository
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: Close stale issues
frequencies:
- hourly:
hour: 3
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- hasLabel:
label: no-recent-activity
- noActivitySince:
days: 3
- isNotLabeledWith:
label: 'bot: do not close'
actions:
- closeIssue
onFailure:
onSuccess:
52 changes: 52 additions & 0 deletions .github/policies/issue.flag-for-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Flag for triage
description: Add triage labels and default assignments to issues
resource: repository
configuration:
resourceManagementConfiguration:
eventResponderTasks:

- description: Add needs triage label to new issues
if:
- payloadType: Issues
- and:
- isAction:
action: Opened
- not:
isAssignedToSomeone
then:
- addLabel:
label: 'Needs: Triage (Functions)'

- description: Add needs attention label to reopened issues
if:
- payloadType: Issues
- and:
- isAction:
action: Reopened
- not:
hasLabel: 'Needs: Attention :wave:'
then:
- addLabel:
label: 'Needs: Attention :wave:'

- description: Assign issues when marked for triage or when attention needed again
if:
- payloadType: Issues
- isAction:
action: Labeled
- not:
isAssignedToSomeone
- or:
- labelAdded:
label: 'Needs: Triage (Functions)'
- labelAdded:
label: 'Needs: Attention :wave:'
then:
- assignIcmUsers:
teamId: 114785
primary: true
secondary: false
triggerOnOwnActions: true

onFailure:
onSuccess:
33 changes: 33 additions & 0 deletions .github/policies/issue.prevent-auto-close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Prevent auto-close
description: Prevents issue from being closed by the automation
resource: repository
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- description: Prevents issue from being closed by the automation
if:
- payloadType: Issue_Comment
- or :
- isAction:
action: Created
- isAction:
action: Edited
- commentContains:
pattern: /bot not-stale
isRegex: False
- and:
- hasLabel:
label: 'Needs: Author Feedback'
- hasLabel:
label: no-recent-activity
- not:
hasLabel: 'bot: do not close'
then:
- addLabel:
label: 'bot: do not close'
- addLabel:
label: 'Needs: Attention :wave:'
- addReply:
reply: Thank you ${contextualAuthor}. This issue will not be automatically closed and a member of the team will review it soon.
onFailure:
onSuccess:
25 changes: 25 additions & 0 deletions .github/policies/issue.remove-needs-author-feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Remove needs author feedback label.
description: Remove needs author feedback label and adds needs attention
resource: repository
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- description: Remove needs author feedback label. Add needs attention
if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: 'Needs: Author Feedback'
then:
- if:
- isOpen
then:
- addLabel:
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'Needs: Author Feedback'
onFailure:
onSuccess:
45 changes: 45 additions & 0 deletions .github/policies/issue.remove-needs-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Remove triage labels on close
description: Removes "needs:*" labels from closed issues
resource: repository
configuration:
resourceManagementConfiguration:
eventResponderTasks:

- description: Remove needs triage label from closed issues
if:
- payloadType: Issues
- isAction:
action: Closed
- hasLabel:
label: 'Needs: Triage (Functions)'
then:
- removeLabel:
label: 'Needs: Triage (Functions)'
triggerOnOwnActions: true

- description: Remove needs attention label from closed issues
if:
- payloadType: Issues
- isAction:
action: Closed
- hasLabel:
label: 'Needs: Attention :wave:'
then:
- removeLabel:
label: 'Needs: Attention :wave:'
triggerOnOwnActions: true

- description: Remove needs author feedback label from closed issues
if:
- payloadType: Issues
- isAction:
action: Closed
- hasLabel:
label: 'Needs: Author Feedback'
then:
- removeLabel:
label: 'Needs: Author Feedback'
triggerOnOwnActions: true

onFailure:
onSuccess:
18 changes: 18 additions & 0 deletions .github/policies/issue.remove-no-recent-activity-with-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Remove no recent activity label
description: Remove no recent activity label when issue is commented on
resource: repository
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- description: Remove no recent activity label when issue is commented on
if:
- payloadType: Issue_Comment
- isAction:
action: Created
- hasLabel:
label: no-recent-activity
then:
- removeLabel:
label: no-recent-activity
onFailure:
onSuccess:
Loading
Loading