diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index dd4a25c756..0000000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,2491 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "taskName": "Replace needs author feedback label with needs attention label when the author comments on an issue", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Attention :wave:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - }, - "id": "CIypIJG15L" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label from issues", - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "tfFb5MZkEN" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 6, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 3 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "eiuNSJBgWu" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 6, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 4 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "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**." - } - } - ] - }, - "id": "Ip_vXNKxak" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close duplicate issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 6, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "duplicate" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 1 - } - } - ], - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes." - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "-zx2TOSryO" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "taskName": "Remove no recent activity label when an issue is commented on", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "id": "jagMoVNuz" - }, - { - "taskType": "trigger", - "capabilityId": "InPrLabel", - "subCapability": "InPrLabel", - "version": "1.0", - "id": "llWcC3LFk", - "config": { - "taskName": "Add In-PR label when PR is created", - "label_inPr": "State: In Review", - "fixedLabelEnabled": true, - "label_fixed": "State: Completed" - } - }, - { - "taskType": "trigger", - "capabilityId": "EmailCleanser", - "subCapability": "EmailCleanser", - "version": "1.0", - "id": "An4EMupLV", - "config": { - "taskName": "Email cleanser" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isOpen", - "parameters": {} - } - ] - }, - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isCloseAndComment", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "none" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "For issues closed due to inactivity, re-open an issue if issue author posts a reply within 7 days.", - "actions": [ - { - "name": "reopenIssue", - "parameters": {} - }, - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Needs: Attention :wave:" - } - } - ] - }, - "id": "IRTbTrSfM" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isOpen", - "parameters": {} - } - ] - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "none" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isCloseAndComment", - "parameters": {} - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "For issues closed with no activity over 7 days, ask non-contributor to consider opening a new issue instead.", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!" - } - } - ] - }, - "id": "yF5wT4TJm9" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 1, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 6, - "hours": [ - 0, - 6, - 12, - 18 - ] - } - ], - "searchTerms": [ - { - "name": "isClosed", - "parameters": {} - }, - { - "name": "noActivitySince", - "parameters": { - "days": 30 - } - }, - { - "name": "isUnlocked", - "parameters": {} - }, - { - "name": "isIssue", - "parameters": {} - } - ], - "taskName": "Lock issues closed without activity for over 30 days", - "actions": [ - { - "name": "lockIssue", - "parameters": { - "reason": "resolved" - } - } - ] - }, - "id": "SOEjDgJPlH" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "taskName": "Add needs author feedback label to pull requests when changes are requested", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "submitted" - } - }, - { - "name": "isReviewState", - "parameters": { - "state": "changes_requested" - } - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "UoZhI9Xa_b" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "taskName": "Remove needs author feedback label when the author responds to a pull request", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] - }, - "id": "OBnWQyDvQP" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "taskName": "Remove needs author feedback label when the author comments on a pull request", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] - }, - "id": "-vTgwlrBFi" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "taskName": "Remove needs author feedback label when the author responds to a pull request review comment", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "n0PmRx-B7j" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label from pull requests", - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] - }, - "id": "wnHBiGRhLL" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label when a pull request is commented on", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] - }, - "id": "zQ4HFBl0o8" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label when a pull request is reviewed", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "8Zyb0OGTkn" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale pull requests", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 1, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 2, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 3, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 4, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 5, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 6, - "hours": [ - 4, - 10, - 16, - 22 - ] - } - ], - "searchTerms": [ - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "bWkxtxkwbN" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to pull requests", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 1, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 2, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 3, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 4, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 5, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 6, - "hours": [ - 5, - 11, - 17, - 23 - ] - } - ], - "searchTerms": [ - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**." - } - } - ] - }, - "id": "NU4lWfVyPH" - }, - { - "taskType": "trigger", - "capabilityId": "AutoMerge", - "subCapability": "AutoMerge", - "version": "1.0", - "config": { - "taskName": "Automatically merge pull requests", - "label": "Auto Merge", - "silentMode": false, - "minMinutesOpen": 480, - "mergeType": "squash", - "allowAutoMergeInstructionsWithoutLabel": true, - "deleteBranches": true, - "removeLabelOnPush": true - }, - "id": "hLdY5T4NXX" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "XKioHvoYL", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "In progress" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add \"work-in Progress\" label when moved to In progress column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Completed" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Blocked" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "work-in-progress" - } - } - ] - }, - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "aKMJYzAt3", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "Blocked" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Blocked label when moved to blocked column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "work-in-progress" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Completed" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "State: Blocked" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "EC_eKTm6n", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label with welcome message", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "Hello ${issueAuthor}, thank you for opening an issue with us! \n\nI have automatically added a \"needs triage\" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "4rdSarog3", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "Done" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Done column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "work-in-progress" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Blocked" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "State: Completed" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "1NzGEY0Ts", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "Need Triage" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Needs Triage label when moved to Need Triage column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "work-in-progress" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Blocked" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Completed" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "Jc0XDwav7", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "To do" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add In Review label when moved to To do column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "work-in-progress" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Blocked" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Completed" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "State: In Review" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "0aFXS94BF", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Completed column in the project" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "1D75705wk", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Completed column in the project" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "TzbnPh5Ns", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "VuBrytO5f", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Completed column in the project" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "NdorH5DKo", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Completed column in the project" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "ynjXgMrwM", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "beth-panx" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "uXuAa-NuO", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "nmetulev" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "Tp7y8GKhw", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "elisenyang" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "PW31TsJS3", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "tramadon" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "gi-wugm-f", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "vogtn" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "id": "-6FfHwtvg", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Thank you for creating a Pull Request @${issueAuthor}.\n\nThis is a checklist for the PR reviewer(s) to complete before approving and merging this PR:\n\n- [ ] I have verified a documentation PR has been linked and is approved (or not applicable) \n- [ ] I have ran this PR locally and have tested the fix/feature\n- [ ] I have verified that stories have been added to storybook (or not applicable) \n- [ ] I have tested existing stories in storybook to verify no regression has occured\n- [ ] I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)" - } - } - ], - "taskName": "Add PR reviewer checklist on open PRs" - }, - "disabled": false - } - ], - "userGroups": [] -} diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 0000000000..0f24537e12 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,266 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 1 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - hasLabel: + label: no-recent-activity + - noActivitySince: + days: 3 + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 1 + 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**. + - description: + frequencies: + - hourly: + hour: 1 + filters: + - isIssue + - isOpen + - hasLabel: + label: duplicate + - noActivitySince: + days: 1 + actions: + - addReply: + reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes. + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - hasLabel: + label: no-recent-activity + - noActivitySince: + days: 7 + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - noActivitySince: + days: 7 + - isNotLabeledWith: + label: no-recent-activity + actions: + - addLabel: + label: no-recent-activity + - addReply: + reply: This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**. + eventResponderTasks: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'Needs: Author Feedback' + then: + - addLabel: + label: 'Needs: Attention :wave:' + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request + then: + - inPrLabel: + label: 'State: In Review' + description: + - if: + - payloadType: Issue_Comment + then: + - cleanEmailReply + description: + - if: + - payloadType: Pull_Request_Review + - isAction: + action: Submitted + - isReviewState: + reviewState: Changes_requested + then: + - addLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Pull_Request + - isActivitySender: + issueAuthor: True + - not: + isAction: + action: Closed + - hasLabel: + label: 'Needs: Author Feedback' + then: + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Issue_Comment + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'Needs: Author Feedback' + then: + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Pull_Request_Review + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'Needs: Author Feedback' + then: + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Pull_Request + - not: + isAction: + action: Closed + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request_Review + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request + - hasLabel: + label: Auto Merge + then: + - enableAutoMerge: + mergeMethod: Squash + description: + - if: + - payloadType: Pull_Request + - labelRemoved: + label: Auto Merge + then: + - disableAutoMerge + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Pull_Request + - isAction: + action: Opened + then: + - addReply: + reply: >- + Thank you for creating a Pull Request @${issueAuthor}. + + + This is a checklist for the PR reviewer(s) to complete before approving and merging this PR: + + + - [ ] I have verified a documentation PR has been linked and is approved (or not applicable) + + - [ ] I have ran this PR locally and have tested the fix/feature + + - [ ] I have verified that stories have been added to storybook (or not applicable) + + - [ ] I have tested existing stories in storybook to verify no regression has occured + + - [ ] I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser) + description: +onFailure: +onSuccess: diff --git a/.storybook/manager-head.html b/.storybook/manager-head.html index a9228249d4..bf016065f5 100644 --- a/.storybook/manager-head.html +++ b/.storybook/manager-head.html @@ -292,6 +292,13 @@ color: #616159 !important; } + /* Fix color contrast of left expanded/collapsed chevrons */ + + .sto-bt79wf, + .sto-1j9r8vi { + color: unset; + } + /* Removes Find component feature */ .css-8ktt77 { display: none; diff --git a/packages/mgt-components/src/components/mgt-agenda/mgt-agenda.graph.ts b/packages/mgt-components/src/components/mgt-agenda/mgt-agenda.graph.ts index 1f08d12196..c401912b0c 100644 --- a/packages/mgt-components/src/components/mgt-agenda/mgt-agenda.graph.ts +++ b/packages/mgt-components/src/components/mgt-agenda/mgt-agenda.graph.ts @@ -8,6 +8,16 @@ import { GraphPageIterator, IGraph, prepScopes } from '@microsoft/mgt-element'; import * as MicrosoftGraph from '@microsoft/microsoft-graph-types'; +export const getEventsQueryPageIterator = async ( + graph: IGraph, + query: string, + scopes = 'calendars.read' +): Promise> => { + const request = graph.api(query).middlewareOptions(prepScopes(scopes)).orderby('start/dateTime'); + + return GraphPageIterator.create(graph, request); +}; + /** * returns Calender events iterator associated with either the logged in user or a specific groupId * @@ -24,8 +34,6 @@ export const getEventsPageIterator = async ( endDateTime: Date, groupId?: string ): Promise> => { - const scopes = 'calendars.read'; - const sdt = `startdatetime=${startDateTime.toISOString()}`; const edt = `enddatetime=${endDateTime.toISOString()}`; @@ -39,7 +47,5 @@ export const getEventsPageIterator = async ( uri += `/calendarview?${sdt}&${edt}`; - const request = graph.api(uri).middlewareOptions(prepScopes(scopes)).orderby('start/dateTime'); - - return GraphPageIterator.create(graph, request); + return getEventsQueryPageIterator(graph, uri); }; diff --git a/packages/mgt-components/src/components/mgt-agenda/mgt-agenda.ts b/packages/mgt-components/src/components/mgt-agenda/mgt-agenda.ts index 9a49c83861..c4a315b425 100644 --- a/packages/mgt-components/src/components/mgt-agenda/mgt-agenda.ts +++ b/packages/mgt-components/src/components/mgt-agenda/mgt-agenda.ts @@ -20,7 +20,7 @@ import { import '../../styles/style-helper'; import '../mgt-person/mgt-person'; import { styles } from './mgt-agenda-css'; -import { getEventsPageIterator } from './mgt-agenda.graph'; +import { getEventsPageIterator, getEventsQueryPageIterator } from './mgt-agenda.graph'; import { SvgIcon, getSvg } from '../../utils/SvgHelper'; import { MgtPeople } from '../mgt-people/mgt-people'; import { registerFluentComponents } from '../../utils/FluentComponents'; @@ -182,9 +182,9 @@ export class MgtAgenda extends MgtTemplatedComponent { /** * allows developer to specify preferred timezone that should be used for - * retrieving events from Graph, eg. `Pacific Standard Time`. The preferred timezone for - * the current user can be retrieved by calling `me/mailboxSettings` and - * retrieving the value of the `timeZone` property. + * rendering events retrieved from Graph, eg. `America/Los_Angeles`. + * By default events are rendered using the current timezone of the + * device being used. * * @type {string} */ @@ -629,17 +629,14 @@ export class MgtAgenda extends MgtTemplatedComponent { } else { query = this.eventQuery; } + const iterator = await getEventsQueryPageIterator(graph, query, scope); + if (iterator?.value) { + events = iterator.value; - let request = graph.api(query); - - if (scope) { - request = request.middlewareOptions(prepScopes(scope)); - } - - const results = (await request.get()) as CollectionResponse; - - if (results?.value) { - events = results.value; + while (iterator.hasNext) { + await iterator.next(); + events = iterator.value; + } } // eslint-disable-next-line no-empty } catch (e) {} diff --git a/packages/mgt-components/src/components/mgt-file-list/mgt-file-list.ts b/packages/mgt-components/src/components/mgt-file-list/mgt-file-list.ts index 38921b9caa..a1c5dc1558 100644 --- a/packages/mgt-components/src/components/mgt-file-list/mgt-file-list.ts +++ b/packages/mgt-components/src/components/mgt-file-list/mgt-file-list.ts @@ -80,7 +80,7 @@ registerFluentComponents(fluentProgressRing); @customElement('file-list') export class MgtFileList extends MgtTemplatedComponent implements CardSection { - private _isCompact = false; + @state() private _isCompact = false; /** * Array of styles to apply to the element. The styles should be defined * using the `css` tag function. @@ -554,7 +554,6 @@ export class MgtFileList extends MgtTemplatedComponent implements CardSection { */ protected clearState(): void { super.clearState(); - this._isCompact = false; this.files = null; } @@ -566,7 +565,6 @@ export class MgtFileList extends MgtTemplatedComponent implements CardSection { */ public asCompactView() { this._isCompact = true; - this.requestUpdate(); return this; } @@ -578,7 +576,6 @@ export class MgtFileList extends MgtTemplatedComponent implements CardSection { */ public asFullView() { this._isCompact = false; - this.requestUpdate(); return this; } diff --git a/packages/mgt-components/src/components/mgt-login/mgt-login.scss b/packages/mgt-components/src/components/mgt-login/mgt-login.scss index b8e2c95cdb..69a756437c 100644 --- a/packages/mgt-components/src/components/mgt-login/mgt-login.scss +++ b/packages/mgt-components/src/components/mgt-login/mgt-login.scss @@ -14,7 +14,9 @@ $signed-out-bg: padding-box linear-gradient(var(--neutral-fill-rest), var(--neut $signed-out-background: #{var(--login-signed-out-button-background, $signed-out-bg)}; $signed-out-hover-background: #{var(--login-signed-out-button-hover-background, var(--neutral-fill-stealth-hover))}; $login-popup-background-color: #{var(--login-popup-background-color, var(--neutral-layer-1))}; +$login-account-item-hover-bg-color: #{var(--login-account-item-hover-bg-color, var(--neutral-fill-stealth-hover))}; $button-padding: var(--login-button-padding, 0); +$login-flyout-command-text-color: #{var(--login-flyout-command-text-color, var(--accent-foreground-rest))}; :host { .signed-in-person { @@ -108,13 +110,15 @@ $button-padding: var(--login-button-padding, 0); list-style-type: none; &:hover { - background: var(--neutral-fill-stealth-hover); + background: $login-account-item-hover-bg-color; + + --person-background-color: $login-account-item-hover-bg-color; } } .flyout { .flyout-command { - color: var(--accent-foreground-rest); + color: $login-flyout-command-text-color; } .popup { diff --git a/packages/mgt-components/src/components/mgt-login/mgt-login.ts b/packages/mgt-components/src/components/mgt-login/mgt-login.ts index 8055570145..51881e1ced 100644 --- a/packages/mgt-components/src/components/mgt-login/mgt-login.ts +++ b/packages/mgt-components/src/components/mgt-login/mgt-login.ts @@ -71,7 +71,6 @@ type PersonViewConfig = { * @cssprop --login-signed-out-button-text-color - {Color} the background color of the component when signed out. * @cssprop --login-button-padding - {Length} the padding of the button. Default is 0px. * @cssprop --login-popup-background-color - {Color} the background color of the popup. - * @cssprop --login-popup-text-color - {Color} the color of the text in the popup. * @cssprop --login-popup-command-button-background-color - {Color} the color of the background to the popup command button. * @cssprop --login-popup-padding - {Length} the padding applied to the popup card. Default is 16px. * @cssprop --login-add-account-button-text-color - {Color} the color for the text and icon of the add account button. @@ -80,6 +79,8 @@ type PersonViewConfig = { * @cssprop --login-command-button-text-color - {Color} the color for the text of the command button. * @cssprop --login-command-button-background-color - {Color} the color for the background of the command button. * @cssprop --login-command-button-hover-background-color - {Color} the color for the background of the command button on hovering. + * @cssprop --login-account-item-hover-bg-color - {Color} the background color of the account item on hover. + * @cssprop --login-flyout-command-text-color - {Color} the color for the text of the flyout command button. */ @customElement('login') export class MgtLogin extends MgtTemplatedComponent { diff --git a/packages/mgt-components/src/components/mgt-tasks/mgt-tasks.scss b/packages/mgt-components/src/components/mgt-tasks/mgt-tasks.scss index 2a5a267159..730a335d0b 100644 --- a/packages/mgt-components/src/components/mgt-tasks/mgt-tasks.scss +++ b/packages/mgt-components/src/components/mgt-tasks/mgt-tasks.scss @@ -52,6 +52,7 @@ $task-new-dropdown-border-radius: var(--task-new-dropdown-border-radius, calc(va padding: $tasks-padding; border: $tasks-border; border-radius: $tasks-border-radius; + font-family: $font-family; --skeleton-fill: var(--neutral-foreground-active); diff --git a/packages/mgt-element/src/Graph.ts b/packages/mgt-element/src/Graph.ts index d2f0aa5db3..bdc9f52778 100644 --- a/packages/mgt-element/src/Graph.ts +++ b/packages/mgt-element/src/Graph.ts @@ -159,6 +159,7 @@ export const createFromProvider = (provider: IProvider, version?: string, compon const baseURL = provider.baseURL ? provider.baseURL : MICROSOFT_GRAPH_DEFAULT_ENDPOINT; const client = Client.initWithMiddleware({ middleware: chainMiddleware(...middleware), + customHosts: typeof provider.customHosts === undefined ? null : new Set(provider.customHosts), baseUrl: baseURL }); diff --git a/packages/mgt-element/src/components/baseProvider.ts b/packages/mgt-element/src/components/baseProvider.ts index a74f013b49..56965e81c3 100644 --- a/packages/mgt-element/src/components/baseProvider.ts +++ b/packages/mgt-element/src/components/baseProvider.ts @@ -78,6 +78,18 @@ export abstract class MgtBaseProvider extends MgtBaseComponent { }) public baseUrl: GraphEndpoint; + /** + * Custom Hosts to be passed through to the graph client + * + * @memberof MgtBaseProvider + */ + @property({ + attribute: 'custom-hosts', + type: String, + converter: newValue => newValue.split(',').map(s => s.trim()) + }) + public customHosts?: string[]; + private _provider: IProvider; /** diff --git a/packages/mgt-element/src/providers/IProvider.ts b/packages/mgt-element/src/providers/IProvider.ts index 0dd2d6a5bd..54aa47549e 100644 --- a/packages/mgt-element/src/providers/IProvider.ts +++ b/packages/mgt-element/src/providers/IProvider.ts @@ -67,6 +67,19 @@ export abstract class IProvider implements AuthenticationProvider { return this._baseURL; } + private _customHosts?: string[] = undefined; + + /** + * Custom Hostnames to allow graph client to utilize + */ + public set customHosts(hosts: string[] | undefined) { + this._customHosts = hosts; + } + + public get customHosts(): string[] | undefined { + return this._customHosts; + } + /** * Enable/Disable incremental consent * diff --git a/packages/providers/mgt-msal2-provider/src/Msal2Provider.ts b/packages/providers/mgt-msal2-provider/src/Msal2Provider.ts index d5f32f9fd9..e300bc6a36 100644 --- a/packages/providers/mgt-msal2-provider/src/Msal2Provider.ts +++ b/packages/providers/mgt-msal2-provider/src/Msal2Provider.ts @@ -146,6 +146,14 @@ export interface Msal2Config extends Msal2ConfigBase { * The base URL for the graph client */ baseURL?: GraphEndpoint; + + /** + * CustomHosts + * + * @type {string[]} + * @memberof Msal2Config + */ + customHosts?: string[]; } /** @@ -394,6 +402,7 @@ export class Msal2Provider extends IProvider { this.isMultipleAccountEnabled = typeof msal2config.isMultiAccountEnabled !== 'undefined' ? msal2config.isMultiAccountEnabled : true; this.baseURL = typeof msal2config.baseURL !== 'undefined' ? msal2config.baseURL : this.baseURL; + this.customHosts = msal2config.customHosts; this.graph = createFromProvider(this); try { diff --git a/packages/providers/mgt-msal2-provider/src/mgt-msal2-provider.ts b/packages/providers/mgt-msal2-provider/src/mgt-msal2-provider.ts index 69606d4d15..cd68e3158f 100644 --- a/packages/providers/mgt-msal2-provider/src/mgt-msal2-provider.ts +++ b/packages/providers/mgt-msal2-provider/src/mgt-msal2-provider.ts @@ -195,6 +195,10 @@ export class MgtMsal2Provider extends MgtBaseProvider { config.baseURL = this.baseUrl; } + if (this.customHosts) { + config.customHosts = this.customHosts; + } + this.provider = new Msal2Provider(config); Providers.globalProvider = this.provider; } diff --git a/samples/proxy-provider-asp-net-core/Controllers/HomeController.cs b/samples/proxy-provider-asp-net-core/Controllers/HomeController.cs index e82d5f6a89..ba27f70c14 100644 --- a/samples/proxy-provider-asp-net-core/Controllers/HomeController.cs +++ b/samples/proxy-provider-asp-net-core/Controllers/HomeController.cs @@ -75,7 +75,7 @@ public async Task SendEmail(string recipients) } } - [AllowAnonymous] + [Authorize] public IActionResult Messages() { return View(); diff --git a/samples/proxy-provider-asp-net-core/Views/Home/Messages.cshtml b/samples/proxy-provider-asp-net-core/Views/Home/Messages.cshtml index 8d65a9028e..c765f66a6d 100644 --- a/samples/proxy-provider-asp-net-core/Views/Home/Messages.cshtml +++ b/samples/proxy-provider-asp-net-core/Views/Home/Messages.cshtml @@ -16,9 +16,9 @@ const messagesGet = document.getElementById('messagesGet'); channelPicker.addEventListener('selectionChanged', e => { - if (e.detail.length) { - let channelId = e.detail[0].channel.id; - let teamId = e.detail[0].team.id; + if (e.detail) { + let channelId = e.detail.channel.id; + let teamId = e.detail.team.id; messagesGet.resource = `teams/${teamId}/channels/${channelId}/messages/delta`; } }); diff --git a/samples/proxy-provider-asp-net-core/Views/Shared/_Layout.cshtml b/samples/proxy-provider-asp-net-core/Views/Shared/_Layout.cshtml index 8b78ae92f1..af8b4d7358 100644 --- a/samples/proxy-provider-asp-net-core/Views/Shared/_Layout.cshtml +++ b/samples/proxy-provider-asp-net-core/Views/Shared/_Layout.cshtml @@ -19,7 +19,7 @@ - + diff --git a/samples/proxy-provider-asp-net-core/wwwroot/css/site.css b/samples/proxy-provider-asp-net-core/wwwroot/css/site.css index ef19693235..a8a277960d 100644 --- a/samples/proxy-provider-asp-net-core/wwwroot/css/site.css +++ b/samples/proxy-provider-asp-net-core/wwwroot/css/site.css @@ -28,12 +28,23 @@ textarea { width: 100%; } -mgt-login { +.login { --button-color: #9d9d9d; --button-background-color--hover: transparent; --button-color--hover: white; } +.navbar-collapse.collapse { + display: flex!important; + align-items: center; + justify-content: space-between; +} + +.navbar-collapse.collapse::after, +.navbar-collapse.collapse::before { + display: none; +} + /* Hide/rearrange for smaller screens */ @media screen and (max-width: 767px) { /* Hide captions */ diff --git a/stories/components/agenda/agenda.properties.js b/stories/components/agenda/agenda.properties.js index ec606a188b..4fc790694d 100644 --- a/stories/components/agenda/agenda.properties.js +++ b/stories/components/agenda/agenda.properties.js @@ -15,7 +15,7 @@ export default { }; export const getByEventQuery = () => html` - + `; export const groupByDay = () => html` diff --git a/stories/components/login/login.styles.js b/stories/components/login/login.styles.js index e3a0c1fc01..f9622cc39b 100644 --- a/stories/components/login/login.styles.js +++ b/stories/components/login/login.styles.js @@ -15,7 +15,7 @@ export default { }; export const customCSSProperties = () => html` - +