From a1d239c6172c7d1d8cbe3657dd3714b3628478ef Mon Sep 17 00:00:00 2001 From: Kyle Dodson Date: Sat, 31 Aug 2024 22:15:08 -0700 Subject: [PATCH] Add community and contribution resources --- .editorconfig | 45 +++++++++++++ .github/CODEOWNERS | 5 +- .github/CODE_OF_CONDUCT.md | 75 ++++++++++++++++++++++ .github/CONTRIBUTING.md | 39 +++++++++++ .github/ISSUE_TEMPLATE/bug_report.yml | 40 ++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 26 ++++++++ .github/PULL_REQUEST_TEMPLATE.md | 8 +++ .github/SECURITY.md | 14 ++++ .github/SUPPORT.md | 3 + .github/workflows/publish.yml | 4 +- .github/workflows/stale.yml | 41 ++++++++++++ .prettierrc.yaml | 11 ++++ 13 files changed, 313 insertions(+), 3 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/SECURITY.md create mode 100644 .github/SUPPORT.md create mode 100644 .github/workflows/stale.yml create mode 100644 .prettierrc.yaml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..100cc3a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,45 @@ +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{bat,cmd}] +end_of_line = crlf +indent_size = 2 +max_line_length = 120 + +[*.cs] +charset = utf-8-bom +max_line_length = 120 + +[*.{csproj,props,targets}] +charset = utf-8-bom +indent_size = 2 + +[*.json] +indent_size = 2 +max_line_length = 120 + +[*.md] +indent_size = 2 + +[*.ps1] +end_of_line = lf +max_line_length = 120 + +[*.sh] +end_of_line = lf +indent_size = 2 +max_line_length = 120 + +[*.sln] +charset = utf-8-bom +indent_style = tab + +[*.{yml,yaml}] +indent_size = 2 +max_line_length = 120 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ec2ee9f..049750a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,4 @@ -* @SaladTechnologies/admins +* @SaladTechnologies/admins @SaladTechnologies/devops + +# Administrators must approve changes to code owners (and other GitHub-specific resources). +/.github/ @SaladTechnologies/admins diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..c2c08db --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,75 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [`dev@salad.com`](mailto:dev@salad.com). All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). + +Community Impact guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..deb3405 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,39 @@ +# Contributing + +Thanks for being here and for being awesome! 👍 + +The following sections outline the different ways to contribute to the project. + +## Discussing + +The easiest way to contribute to the project is by participating in [GitHub discussions](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/discussions). The community often chimes in with helpful advice when you have a question, and you may also find yourself providing answers and helping others. Be sure to review the [code of conduct](./CODE_OF_CONDUCT.md) before participating. + +_Please do not use GitHub issues to ask a question._ We will politely close a GitHub issue that asks a question and kindly refer you to one of the aforementioned avenues. + +## Reporting Bugs + +We're sorry if this happened to you! Consider jumping into [GitHub discussions](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/discussions) first. The community may have already found a solution. + +You can create a [GitHub issue](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/issues) to report bugs. You can also create an [official support request](mailto:cloud@salad.com) if you have a specific question that should be answered by a team member. + +## Requesting Features + +We love a good idea. Do you have one? Consider jumping into [GitHub discussions](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/discussions) first. The community may have some interesting insights. + +You can create a [GitHub issue](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/issues) to request new features. + +## Reporting Security Vulnerabilities + +We take security seriously, and we appreciate your cooperation in disclosing vulnerabilities to us responsibly. Refer to our [security policy](./SECURITY.md) for more details. + +_Please do not use public GitHub issues to report a security vulnerability._ + +## Changing Code + +Interested in changing the world? + +First, take note that the code in this project is automatically generated by [liblab](https://liblab.com/) using the official OpenAPI Specification document for the SaladCloud API. Not all code contributions are accepted as they may simply be overwritten the next time the code is automatically generated. + +Before starting on any code contribution, please discuss it with the team first to ensure it is compatible with this project's toolchain and fits in the product roadmap. We will politely close a GitHub pull request that is not compatible with or cannot be maintained by this project's toolchain. + +Additionally, please consider taking a moment to read Miguel de Icaza's blog post titled [Open Source Contribution Etiquette](https://tirania.org/blog/archive/2010/Dec-31.html) and Ilya Grigorik's blog post titled [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/). diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..573fc0b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,40 @@ +name: Report a bug +description: Let us know if you encountered an issue. +labels: + - bug +body: + - type: markdown + attributes: + value: Thanks for taking the time to fill out this bug report! We encourage you to start with a [GitHub discussion](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/discussions) to ensure this issue is new. If this issue is security related, please disclose vulnerabilities to us responsibly as a [GitHub security advisory](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/security/advisories/new). + - type: textarea + id: actual + attributes: + label: What actually happened? + description: Please provide as much information about the issue as possible. + validations: + required: true + - type: textarea + id: expected + attributes: + label: What did you expect to happen? + description: Please provide as much information about the issue as possible. + validations: + required: true + - type: textarea + id: repro + attributes: + label: How can we reproduce it? + description: Please provide as succinct a reproduction as possible. + validations: + required: true + - type: textarea + id: extra + attributes: + label: Anything else we should know? + - type: textarea + id: sdkVersion + attributes: + label: What is the version of your SaladCloud SDK? + description: e.g. 1.0.1 + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..b234750 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Request support + url: https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/discussions + about: Please use GitHub discussions for general chat and community-provided support. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..2b348c7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,26 @@ +name: Request a feature +description: Let us know if you have ideas for issues you would like to see supported. +labels: + - enhancement +body: + - type: markdown + attributes: + value: Thanks for taking the time to fill out this feature request! We encourage you to start with a [GitHub discussion](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/discussions) to ensure this issue fits in the roadmap. If this issue is security related, please disclose vulnerabilities to us responsibly as a [GitHub security advisory](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/security/advisories/new). + - type: textarea + id: feature + attributes: + label: What do you want? + description: Please provide as much information about the issue as possible. + validations: + required: true + - type: textarea + id: expected + attributes: + label: Why is it needed? + description: Please provide as much information about the issue as possible. + validations: + required: true + - type: textarea + id: extra + attributes: + label: Anything else we should know? diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..bc6f0af --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ + diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..89bcf71 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,14 @@ +# Security + +## Reporting Security Vulnerabilities + +We take security seriously, and we appreciate your cooperation in disclosing vulnerabilities to us responsibly. + +_Please do not use public GitHub issues to report a security vulnerability._ + +Instead, please do one of the following: + +- Open a GitHub security advisory on the [GitHub repository](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/security/advisories/new) +- Send an email to [`dev@salad.com`](mailto:dev@salad.com) + +Please include as much information as you can provide to help us better understand the nature and scope of the issue. diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 0000000..0848b0e --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,3 @@ +# Support + +We use [GitHub discussions](https://github.com/SaladTechnologies/salad-cloud-sdk-dotnet/discussions) for general chat and community-provided support. The community often chimes in with helpful advice when you have a question, and you may also find yourself providing answers and helping others. Be sure to review the [code of conduct](./CODE_OF_CONDUCT.md) before participating. diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ab5a6bb..d43d809 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,8 +10,8 @@ env: NUGET_API_SOURCE: https://api.nuget.org/v3/index.json jobs: - build-and-publish: - name: Build and Publish + publish: + name: Publish Package runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..3431030 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,41 @@ +name: Handle Stale Items + +on: + schedule: + - cron: "0 * * * *" + +permissions: + contents: write + issues: write + pull-requests: write + +jobs: + stale: + name: Handle Stale Items + runs-on: ubuntu-latest + steps: + - name: Apply stale policy + uses: actions/stale@v8 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 30 + days-before-close: 7 + operations-per-run: 25 + remove-stale-when-updated: true + stale-issue-label: "stale" + exempt-issue-labels: "no-stale,help%20wanted,good%20first%20issue" + stale-issue-message: > + There hasn't been activity on this issue in 30 days. + + This issue has been marked stale and will be closed in 7 days if no further activity occurs. + + Issues with the labels `no-stale`, `help wanted`, and `good first issue` are exempt from this policy. + + stale-pr-label: "stale" + exempt-pr-labels: "no-stale" + stale-pr-message: > + There hasn't been any activity on this pull request in 30 days. + + This pull request has been marked stale and will be closed in 7 days if no further activity occurs. + + Pull requests with the label `no-stale` are exempt from this policy. diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..1bb1ac7 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,11 @@ +endOfLine: "auto" +printWidth: 120 +semi: false +singleQuote: true +trailingComma: "all" +overrides: + - files: + - "*.yaml" + - "*.yml" + options: + singleQuote: false