From d1f5c738c5f1d1a50020ee8be7840516973df6e6 Mon Sep 17 00:00:00 2001 From: Hamza Mahmood Date: Fri, 7 Feb 2025 19:05:09 +0500 Subject: [PATCH] docs: add contribution guide Added CONTRIBUTING.md with guidelines on setup, coding standards, branching strategy, and PR process to help contributors. --- .github/ISSUE_TEMPLATE/bug-report.md | 33 -------- .github/ISSUE_TEMPLATE/bug-report.yml | 90 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature-request.yml | 55 +++++++++++++ CONTRIBUTING.md | 62 +++++++++++++++ 4 files changed, 207 insertions(+), 33 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/feature-request.yml create mode 100644 CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index b59c531f..00000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Bug Report -about: Create a report to help us improve the library -title: '' -labels: bug, triage ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**To Reproduce** -Steps to reproduce the bug: -1. (step 1) -2. (step 2) -3. (step 3) -4. ... - -**Screenshots** -If applicable, add screenshots to help explain the bug. - -**Library version number** -For example: 0.1.1 - -**Environmental details** -For example: -OS: Linux -Runtime version: Typescript 14.2 - -**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 00000000..e681a400 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,90 @@ +name: 🐞 Bug +description: Report a bug or an issue you've found +title: "[Bug] " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: checkboxes + attributes: + label: Is this a new bug? + description: > + In other words: Is this an error, flaw, failure or fault? Please search issues to see if someone has already reported the bug you encountered. + options: + - label: I believe this is a new bug + required: true + - label: I have searched the existing issues, and I could not find an existing issue for this bug + required: true + + - type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + validations: + required: true + + - type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + validations: + required: true + + - type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + validations: + required: true + + - type: textarea + attributes: + label: Environment + description: | + examples: + - **OS**: Ubuntu 20.04 + - **Node.js Version**: Example: Node.js v18.17.1 + - **TypeScript Version**: Example: TypeScript 5.3.2 + - **Package Manager & Version**: Example: npm 9.8.1, yarn 1.22.19, pnpm 8.9.0 + - **Compiler / Runtime Details**: Example: If using tsc (mention: tsc --version), If using Bun: Bun v1.1.2, If using Deno: Deno 1.38.0 + - **Framework / Library Versions (if applicable)**: Example: React 18.2.0, Angular 16.0.0, Vue 3.3.4 + - **Browser Version (if applicable)**: Example: Chrome 120.0.6099.110, Firefox 118.0, Edge 115.0 + - **SDK Name**: PayPal (If you are using this library as a dependency, please name the parent SDK) + value: | + - **OS**: + - **Node.js Version**: + - **TypeScript Version**: + - **Package Manager & Version**: + - **Compiler / Runtime Details**: + - **Framework / Library Versions (if applicable)**: + - **Browser Version (if applicable)**: + - **Browser Version (if applicable)**: + - **SDK Name**: + render: markdown + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Relevant log output + description: | + If applicable, log output to help explain your problem. + render: shell + validations: + required: false + + - type: textarea + attributes: + label: Additional Context + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + validations: + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 00000000..e1707d52 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,55 @@ +name: ✨ Feature +description: Propose a straightforward extension +title: "[Feature] <title>" +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! + - type: checkboxes + attributes: + label: Is this your first time submitting a feature request? + description: > + We want to make sure that features are distinct and discoverable, + so that other members of the community can find them and offer their thoughts. + Issues are the right place to request straightforward extensions of existing functionality. + options: + - label: I have searched the existing issues, and I could not find an existing issue for this feature + required: true + - label: I am requesting an extension of the existing functionality + - type: textarea + attributes: + label: Describe the feature + description: A clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + attributes: + label: Describe alternatives you've considered + description: | + A clear and concise description of any alternative solutions or features you've considered. + validations: + required: false +mrafnadeem-apimatic marked this conversation as resolved. + - type: textarea + attributes: + label: Who will this benefit? + description: | + What kind of use case will this feature be useful for? Please be specific and provide examples, this will help us prioritize properly. + validations: + required: false +asadali214 marked this conversation as resolved. + - type: input + attributes: + label: Are you interested in contributing this feature? + description: Let us know if you want to write some code, and how we can help. + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the feature you are suggesting! + validations: + required: false \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..3c230654 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Contributing to apimatic/apimatic-js-runtime + +Thank you for your interest in contributing! 🎉 Your contributions help make this project better. We value open-source contributions to this library, please take a few minutes to review this guide before you start. + +--- + +## 💡 How to Contribute + +### 📌 1. Reporting Issues + +- Search existing issues before opening a new one. +- Use a **descriptive title** and provide clear steps to reproduce. +- Include relevant logs, screenshots, or error messages. + +### 🔧 2. Making Changes + +#### Step 1: Create a Branch + +- Create a new branch from `master`: + ```sh + git checkout -b your-feature-name + ``` + +#### Step 2: Make Your Changes + +- Follow the project's **coding standards**. +asadali214 marked this conversation as resolved. +- Add **unit tests** if applicable. +- Ensure your changes **do not break existing functionality**. + +#### Step 3: Commit Changes + +- Use clear and descriptive commit messages: + ```sh + git commit -m "feat: Add feature description" + ``` + +#### Step 4: Push & Open a PR + +- Push your branch: + ```sh + git push origin your-feature-name + ``` +- Open a **Pull Request (PR)** on GitHub: + - Provide a clear **description** of the changes. + - Mention related **issue numbers**. + - Request a **review** from maintainers. +mrafnadeem-apimatic marked this conversation as resolved. + - Make sure your changes clear all the **PR Checks**. + +--- + +## 📜 License + +By contributing, you agree that your contributions will be licensed under the project's [LICENSE](LICENSE). + +--- + +💬 **Questions?** +If you need help, feel free to open issues, we will be happy to help. + +Happy Coding! 🚀