Skip to content

Commit

Permalink
Standardize on common Deployments codebase conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-c-martin committed Sep 17, 2024
1 parent 28c06d7 commit 7ac5bf1
Show file tree
Hide file tree
Showing 29 changed files with 73,725 additions and 22,054 deletions.
41 changes: 0 additions & 41 deletions .devcontainer/devcontainer.json

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

49 changes: 49 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
project: './tsconfig.json',
},
plugins: ["header"],
extends: ["eslint:recommended"],
ignorePatterns: ["/out/**/*"],
rules: {
"header/header": [
2,
"line",
[
" Copyright (c) Microsoft Corporation.",
" Licensed under the MIT License.",
],
],
},
overrides: [
{
files: ["*.ts"],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:jest/all",
],
rules: {
"jest/require-hook": "off",
"jest/no-hooks": "off",
"jest/prefer-expect-assertions": "off",
"jest/expect-expect": [
"error",
{
assertFunctionNames: ["expect*"],
},
],
"jest/prefer-importing-jest-globals": "off",
},
},
{
files: ["*.js"],
env: { node: true },
},
],
};
3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

30 changes: 8 additions & 22 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
groups:
actions-minor:
update-types:
- minor
- patch

- package-ecosystem: npm
directory: /
interval: "weekly"
day: "sunday"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: weekly
groups:
npm-development:
dependency-type: development
update-types:
- minor
- patch
npm-production:
dependency-type: production
update-types:
- patch
interval: "weekly"
day: "sunday"
78 changes: 0 additions & 78 deletions .github/linters/.eslintrc.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/linters/.markdown-lint.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/linters/.yaml-lint.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/linters/tsconfig.json

This file was deleted.

73 changes: 73 additions & 0 deletions .github/policies/issueMgmt.recentActivity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

id: issueMgmt.recentActivity
name: GitOps.PullRequestIssueManagement
description: Manages recent activity on issues - closes stale issues, adds updated issues to triage
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: "Close issues with 'Status: No Recent Activity'"
frequencies:
- hourly:
hour: 12
filters:
- isIssue
- isOpen
- hasLabel:
label: "Needs: Author Feedback"
- hasLabel:
label: "Status: No Recent Activity"
- noActivitySince:
days: 3
actions:
- closeIssue

- description: "Add 'Status: No Recent Activity' label to issues with 'Needs: Author Feedback' and inactive"
frequencies:
- hourly:
hour: 12
filters:
- isIssue
- isOpen
- hasLabel:
label: "Needs: Author Feedback"
- noActivitySince:
days: 7
- isNotLabeledWith:
label: "Status: No Recent Activity"
actions:
- addLabel:
label: "Status: No Recent Activity"
- addReply:
reply: "Hi @${issueAuthor}, this issue has been marked as stale because it was labeled as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 3 days of this comment**. Thanks for contributing! :smile: :mechanical_arm:"

eventResponderTasks:
- description: "Replace 'Needs: Author Feedback' with 'Needs: Triage' label when author comments"
if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: "Needs: Author Feedback"
- isOpen
then:
- addLabel:
label: "Needs: Triage :mag:"
- removeLabel:
label: "Needs: Author Feedback"

- description: "Remove 'Status: No Recent Activity' label when an issue is commented on"
if:
- payloadType: Issue_Comment
- hasLabel:
label: "Status: No Recent Activity"
then:
- removeLabel:
label: "Status: No Recent Activity"
onFailure:
onSuccess:
Empty file.
30 changes: 30 additions & 0 deletions .github/policies/prMgmt.dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
id: prMgmt.dependabot
name: GitOps.PullRequestIssueManagement
description: Approves and merges Dependabot PRs
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- description: Approve PRs submitted by dependabot with the "dependencies" label
if:
- payloadType: Pull_Request
- hasLabel:
label: dependencies
- not:
hasLabel:
label: auto-merge
- isActivitySender:
user: dependabot[bot]
issueAuthor: False
then:
- approvePullRequest:
comment: ":shipit:"
- addLabel:
label: auto-merge
- enableAutoMerge:
mergeMethod: Squash
onFailure:
onSuccess:
4 changes: 3 additions & 1 deletion .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ jobs:

- name: Build dist/ Directory
id: build
run: npm run bundle
run: |
rm -Rf dist
npm run package
# This will fail the workflow if the `dist/` directory is different than
# expected.
Expand Down
Loading

0 comments on commit 7ac5bf1

Please sign in to comment.