From a4aeaa13be8d84f10aa4dd978e9e77fa5a1eb627 Mon Sep 17 00:00:00 2001 From: Shreyas Damle Date: Thu, 4 Nov 2021 19:47:42 +0000 Subject: [PATCH] migrate to github issue management v2 --- .github/ISSUE_TEMPLATE/bug_report.md | 32 -------- .github/ISSUE_TEMPLATE/bug_report.yml | 85 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/doc.yml | 25 +++++++ .github/ISSUE_TEMPLATE/example_rules.md | 33 --------- .github/ISSUE_TEMPLATE/feature_request.md | 24 ------ .github/ISSUE_TEMPLATE/feature_request.yml | 63 ++++++++++++++++ .github/ISSUE_TEMPLATE/general_issue.md | 41 ----------- .github/ISSUE_TEMPLATE/general_issue.yml | 63 ++++++++++++++++ .github/ISSUE_TEMPLATE/tracking.yml | 46 ++++++++++++ .github/semantic.yml | 17 +++++ .github/workflows/close_stale_issue.yml | 46 ++++++++++++ .github/workflows/closed_issue_message.yml | 19 +++++ CONTRIBUTING.md | 10 ++- 14 files changed, 372 insertions(+), 133 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/doc.yml delete mode 100644 .github/ISSUE_TEMPLATE/example_rules.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 .github/ISSUE_TEMPLATE/general_issue.md create mode 100644 .github/ISSUE_TEMPLATE/general_issue.yml create mode 100644 .github/ISSUE_TEMPLATE/tracking.yml create mode 100644 .github/semantic.yml create mode 100644 .github/workflows/close_stale_issue.yml create mode 100644 .github/workflows/closed_issue_message.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 4b056a09f..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve AWS CloudFormation Guard -title: "[BUG]" -labels: bug -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Please supply: - -1. Example rules and template that results in the error -1. The commands you used to invoke the tool -1. The output of a `-v` log level if it's not related to cfn-guard-lambda, or the relevant CloudWatch log messages if it is related to the cfn-guard-lambda - -**NOTE: Please be sure that the templates, rules and logs you provide as part of your bug report do not contain any sensitive information.** - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Operating System:** -[eg, MacOS, Windows, Ubuntu, etc] - -**OS Version** -[eg Catalina, 10, 18.04, etc] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..3779a5d90 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,85 @@ +name: Bug Report +description: Report a bug +title: "(module name): short issue description" +labels: [bug, needs-triage] +body: + - type: textarea + id: problem + attributes: + label: What is the problem? + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: Reproduction Steps + description: | + 1. Example rules and template that results in the error + 1. The commands you used to invoke the tool + 1. The output of a `-v` log level if it's not related to cfn-guard-lambda, or the relevant CloudWatch log messages if it is related to the cfn-guard-lambda + validations: + required: true + + - type: markdown + attributes: + value: | + **NOTE: Please be sure that the templates, rules and logs you provide as part of your bug report do not contain any sensitive information.** + + - type: textarea + id: expected + attributes: + label: What did you expect to happen? + description: | + What were you trying to achieve by performing the steps above? + validations: + required: true + + - type: textarea + id: actual + attributes: + label: What actually happened? + description: | + What is the unexpected behavior you were seeing? If you got an error, paste it here. + validations: + required: true + + - type: input + id: guard-version + attributes: + label: CloudFormation Guard Version + description: Output of `cfn-guard -V` + validations: + required: true + + - type: input + id: operating-system + attributes: + label: OS + description: E.g. MacOS | Windows | Ubuntu + validations: + required: true + + - type: input + id: os-version + attributes: + label: OS Version + description: E.g. Catalina | 10 | 18.04 + validations: + required: false + + - type: textarea + id: other + attributes: + label: Other information + description: | + e.g. detailed explanation, scrennshots, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc + validations: + required: false + + - type: markdown + attributes: + value: | + --- + + This is :bug: Bug Report \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..ec4bb386b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/doc.yml b/.github/ISSUE_TEMPLATE/doc.yml new file mode 100644 index 000000000..f237e15f9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/doc.yml @@ -0,0 +1,25 @@ +name: Documentation Issue +description: Issue in the reference documentation or developer guide +title: "(module name): short issue description" +labels: [feature-request, documentation, needs-triage] +body: + - type: input + id: doc-link + attributes: + label: link to reference doc page + validations: + required: false + + - type: textarea + id: issue + attributes: + label: Describe your issue? + validations: + required: true + + - type: markdown + attributes: + value: | + --- + + This is a 📕 documentation issue diff --git a/.github/ISSUE_TEMPLATE/example_rules.md b/.github/ISSUE_TEMPLATE/example_rules.md deleted file mode 100644 index 4c19691ae..000000000 --- a/.github/ISSUE_TEMPLATE/example_rules.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Example rules -about: Submit example rules to help the community learn to use AWS CloudFormation Guard -title: "[RULES]" -labels: rules -assignees: '' - ---- - -**Describe the example rules** - -A clear and concise description of what the rules are demonstrating. - -**Ensure you meet our example rules submission policy** - -1. Do not mention any security or compliance regimes in custom messages, file names, rule comments, etc. Example rules are purely for educational purposes and cannot be represented as providing any kind of certification for control regimes like CIS, GDPR, etc -1. Rules should not be duplicates. Please grep the Examples directory contents to ensure that the rules are not already present in another rules file. -1. Rules must include comments or custom messages that describe the function of the rule. -1. If you are adding new rules to an existing rules file, be sure to update the corresponding tests file (YAML file with the same file name prefix) with test inputs which help understand the rules your adding. -1. If you are adding a new rules file, be sure to include a corresponding tests file with test inputs which help understand the rules present in the rules file you are adding. -1. The preferred file system structure is: - 1. **Examples/-tests.yaml** - 1. **Examples/.guard** - - Meaningful file names can include AWS resource types, types of checks being done (e.g. “check-lambda-function.guard”), etc. -1. Test your rules by running them against the corresponding tests file. Your pull request description must include a markdown-formatted code block showing the result of your test run (not the logs - just the basic output). -1. Rule file names, rule descriptions, etc. should not make mention of the contributor’s identity. (The connection will already be established by merging the commits.) - -**NOTE: Please be sure that the templates, rules and logs you provide as part of your bug report do not contain any sensitive information.** - -**Additional context** - -Add any other context you think is relevant here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 76c0c3467..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "[Enhancement]" -labels: enhancement -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** - -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** - -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** - -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** - -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..3d399d7de --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,63 @@ +name: Feature Request +description: Request a new feature +title: "(module name): short issue description" +labels: [feature-request, needs-triage] +body: + - type: textarea + id: description + attributes: + label: Description + description: Short description of the feature you are proposing. + validations: + required: true + + - type: textarea + id: use-case + attributes: + label: Use Case + description: | + Why do you need this feature? + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: | + Please include prototype/workaround/sketch/reference implementation. + validations: + required: true + + - type: textarea + id: other + attributes: + label: Other information + description: | + e.g. detailed explanation, screenshots, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc + validations: + required: false + + - type: checkboxes + id: acknowledgments + attributes: + label: Acknowledge + options: + - label: I may be able to implement this feature request + required: false + - label: This feature might incur a breaking change + required: false + + + - type: markdown + attributes: + value: | + ### Community Note + * Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request + * Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request + + - type: markdown + attributes: + value: | + --- + This is a :rocket: Feature Request diff --git a/.github/ISSUE_TEMPLATE/general_issue.md b/.github/ISSUE_TEMPLATE/general_issue.md deleted file mode 100644 index 54b9d57fc..000000000 --- a/.github/ISSUE_TEMPLATE/general_issue.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -name: General Issue -about: If your issue does not fall in any of the other categories create an issue with this template. -title: "[GENERAL ISSUE]" -labels: guidance -assignees: '' - ---- - - - -**Describe the issue** -A clear and concise description of what the issue is. - - -**Any examples** -Please supply: - -1. Example rules and template that you have tried -1. The commands you used to invoke the tool -1. The output of a `-v` log level if it's not related to cfn-guard-lambda, or the relevant CloudWatch log messages if it is related to the cfn-guard-lambda - -**NOTE: Please be sure that the templates, rules and logs you provide as part of your issue do not contain any sensitive information.** - -**Operating System:** -[eg, MacOS, Windows, Ubuntu, etc] - -**OS Version** -[eg Catalina, 10, 18.04, etc] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/general_issue.yml b/.github/ISSUE_TEMPLATE/general_issue.yml new file mode 100644 index 000000000..35db0c5dd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/general_issue.yml @@ -0,0 +1,63 @@ +name: General Issue +description: Create a new issue +title: "(module name): short issue description" +labels: [needs-triage, guidance] +body: + - type: markdown + attributes: + value: | + If your issue does not fall in any of the other categories create an issue with this template. + + - type: input + id: issue + attributes: + label: General Issue + description: | + Important Information - Please look at the following sections before creating an issue to see if your question was already answered: + * [Open issues](https://github.com/aws-cloudformation/cloudformation-guard/issues) + * All our [PRs](https://github.com/aws-cloudformation/cloudformation-guard/pulls?q=is%3Apr), both open and close + * Our [documentation](https://github.com/aws-cloudformation/cloudformation-guard#aws-cloudformation-guard) + validations: + required: true + + - type: textarea + id: question + attributes: + label: The Question + description: | + Ask your question here. Include any details relevant. + validations: + required: true + + - type: input + id: guard-version + attributes: + label: CloudFormation Guard Version + description: Output of `cfn-guard -V` + validations: + required: true + + - type: input + id: operating-system + attributes: + label: OS + description: E.g. MacOS | Windows | Ubuntu + validations: + required: true + + - type: input + id: os-version + attributes: + label: OS Version + description: E.g. Catalina | 10 | 18.04 + validations: + required: false + + - type: textarea + id: other + attributes: + label: Other information + description: | + e.g. detailed explanation, scrennshots, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc + validations: + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/tracking.yml b/.github/ISSUE_TEMPLATE/tracking.yml new file mode 100644 index 000000000..a07bd1ca5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/tracking.yml @@ -0,0 +1,46 @@ +name: Tracking Issue +description: Add a tracking issue (internal use only) +title: "Tracking: [service]" +labels: [management/tracking] +body: + - type: markdown + attributes: + value: | + Add your +1 👍 to help us prioritize features for CloudFormation Guard + + - type: textarea + id: overview + attributes: + label: Overview + description: | + Summary of the feature and a link to the relevant rfcs if any. + validations: + required: true + + - type: textarea + id: implementation + attributes: + label: Implementation + description: | + Checklist of use cases, features that will ship in this chnage. + validations: + required: true + + - type: textarea + id: issue-list + attributes: + label: Issue list + description: | + Checklist of links to feature requests, bugs, and PRs that are in scope for GA release of this feature (not required until the issues is added to the public roadmap). + value: | + - [ ] + - [ ] + validations: + required: true + + - type: markdown + attributes: + value: | + --- + + This is a 📊 Tracking Issue \ No newline at end of file diff --git a/.github/semantic.yml b/.github/semantic.yml new file mode 100644 index 000000000..38f51398c --- /dev/null +++ b/.github/semantic.yml @@ -0,0 +1,17 @@ +# Configuration for Semantic Pull Requests +titleOnly: true + +types: + - feat + - fix + - docs + - style + - refactor + - perf + - test + - build + - ci + - chore + - revert + - release + \ No newline at end of file diff --git a/.github/workflows/close_stale_issue.yml b/.github/workflows/close_stale_issue.yml new file mode 100644 index 000000000..467fc403b --- /dev/null +++ b/.github/workflows/close_stale_issue.yml @@ -0,0 +1,46 @@ +name: "Close stale issues" + +# Controls when the action will run. +on: + schedule: + - cron: "*/60 * * * *" + +jobs: + cleanup: + runs-on: ubuntu-latest + name: Stale issue job + steps: + - uses: aws-actions/stale-issue-cleanup@v3 + with: + # Setting messages to an empty string will cause the automation to skip + # that category + ancient-issue-message: Greetings! Sorry to say but this is a very old issue that is probably not getting as much attention as it deservers. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one. + stale-issue-message: Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one. + stale-pr-message: Greetings! It looks like this PR hasn’t been active in longer than a week, add a comment or an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one. + + # These labels are required + stale-issue-label: closing-soon + exempt-issue-label: investigating + stale-pr-label: closing-soon + exempt-pr-label: pr/needs-review + response-requested-label: response-requested + + # Don't set closed-for-staleness label to skip closing very old issues + # regardless of label + closed-for-staleness-label: closed-for-staleness + + # Issue timing + days-before-stale: 7 + days-before-close: 4 + days-before-ancient: 365 + + # If you don't want to mark a issue as being ancient based on a + # threshold of "upvotes", you can set this here. An "upvote" is + # the total number of +1, heart, hooray, and rocket reactions + # on an issue. + minimum-upvotes-to-exempt: 3 + + repo-token: ${{ secrets.GITHUB_TOKEN }} + loglevel: DEBUG + # Set dry-run to true to not perform label or close actions. + # dry-run: true \ No newline at end of file diff --git a/.github/workflows/closed_issue_message.yml b/.github/workflows/closed_issue_message.yml new file mode 100644 index 000000000..e68d6c0a8 --- /dev/null +++ b/.github/workflows/closed_issue_message.yml @@ -0,0 +1,19 @@ +name: Closed Issue Message +on: + issues: + types: [closed] +jobs: + auto_comment: + permissions: + issues: write + runs-on: ubuntu-latest + steps: + - uses: aws-actions/closed-issue-message@v1 + with: + # These inputs are both required + repo-token: "${{ secrets.GITHUB_TOKEN }}" + message: | + ### ⚠️COMMENT VISIBILITY WARNING⚠️ + Comments on closed issues are hard for our team to see. + If you need more assistance, please either tag a team member or open a new issue that references this one. + If you wish to keep having a conversation with other community members under this issue feel free to do so. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e8e430e61..64986b8ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ reported the issue. Please try to include as much information as you can. Detail ## Contributing via Pull Requests Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: -1. You are working against the latest source on the *master* branch. +1. You are working against the latest source on the *main* branch. 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. 3. You open an issue to discuss any significant work - we would hate for your time to be wasted. @@ -34,8 +34,12 @@ To send us a pull request, please: 3. Ensure local tests pass. 4. Commit to your fork using clear commit messages. 5. Send us a pull request, answering any default questions in the pull request interface. -6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. -7. If your pull request includes rules for the Examples, please review the [Examples README](guard-examples/README.md) for the acceptance criteria. +6. Pull request title and message (and PR title and description) must adhere to [conventionalcommits](https://www.conventionalcommits.org/en/v1.0.0/). + - The title must begin with feat(module): title, fix(module): title, refactor(module): title or chore(module): title. + - Title should be lowercase. + - No period at the end of the title. +7. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. +8. If your pull request includes rules for the Examples, please review the [Examples README](guard-examples/README.md) for the acceptance criteria. GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and [creating a pull request](https://help.github.com/articles/creating-a-pull-request/).