From dd7ee8bcba3a6f65c9a2aacefc6f3224886ba31d Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Mon, 28 Aug 2023 19:53:10 +0530 Subject: [PATCH 1/6] adds issue templates --- .github/ISSUE_TEMPLATE/bug_report.yaml | 60 +++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 12 ++++ .github/ISSUE_TEMPLATE/deprecation.yaml | 24 ++++++++ .../ISSUE_TEMPLATE/documentation_change.yaml | 35 +++++++++++ .github/ISSUE_TEMPLATE/feature_request.yaml | 59 ++++++++++++++++++ .github/ISSUE_TEMPLATE/housekeeping.yaml | 24 ++++++++ 6 files changed, 214 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/deprecation.yaml create mode 100644 .github/ISSUE_TEMPLATE/documentation_change.yaml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yaml create mode 100644 .github/ISSUE_TEMPLATE/housekeeping.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 00000000..b6006c83 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,60 @@ +--- +name: 🐛 Bug Report +description: Report a reproducible bug in the current release of pynetbox +labels: ["type: bug"] +body: + - type: markdown + attributes: + value: > + **NOTE:** This form is only for reporting _reproducible bugs_ in a current pynetbox release. + - type: input + attributes: + label: pynetbox version + description: What version of pynetbox are you currently running? + placeholder: v7.1.0 + validations: + required: true + - type: input + attributes: + label: NetBox version + description: What version of NetBox are you currently running? + placeholder: v3.5.8 + validations: + required: true + - type: dropdown + attributes: + label: Python version + description: What version of Python are you currently running? + options: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + validations: + required: true + - type: textarea + attributes: + label: Steps to Reproduce + description: > + Describe in detail the exact steps that someone else can take to + reproduce this bug using the current stable release of NetBox. Begin with the + creation of any necessary database objects and call out every operation being + performed explicitly. Additionally, **do not rely on the demo instance** for + reproducing suspected bugs, as its data is prone to modification or deletion + at any time. + validations: + required: true + - type: textarea + attributes: + label: Expected Behavior + description: What did you expect to happen? + placeholder: A new widget should have been created with the specified attributes + validations: + required: true + - type: textarea + attributes: + label: Observed Behavior + description: What happened instead? + placeholder: A TypeError exception was raised + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..883b6487 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,12 @@ +# Reference: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser +blank_issues_enabled: false +contact_links: + - name: 📖 Contributing Policy + url: https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md + about: "Please read through our contributing policy before opening an issue or pull request." + - name: ❓ Discussion + url: https://github.com/netbox-community/pynetbox/discussions + about: "If you're just looking for help, try starting a discussion instead." + - name: 💬 Community Slack + url: https://netdev.chat + about: "Join #netbox on the NetDev Community Slack for assistance with installation issues and other problems." diff --git a/.github/ISSUE_TEMPLATE/deprecation.yaml b/.github/ISSUE_TEMPLATE/deprecation.yaml new file mode 100644 index 00000000..27e13e5c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/deprecation.yaml @@ -0,0 +1,24 @@ +--- +name: 🗑️ Deprecation +description: The removal of an existing feature or resource +labels: ["type: deprecation"] +body: + - type: textarea + attributes: + label: Proposed Changes + description: > + Describe in detail the proposed changes. What is being removed? + validations: + required: true + - type: textarea + attributes: + label: Justification + description: Please provide justification for the proposed change(s). + validations: + required: true + - type: textarea + attributes: + label: Impact + description: List all areas of the application that will be affected by this change. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/documentation_change.yaml b/.github/ISSUE_TEMPLATE/documentation_change.yaml new file mode 100644 index 00000000..86cc7e75 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation_change.yaml @@ -0,0 +1,35 @@ +--- +name: 📖 Documentation Change +description: Suggest an addition or modification to the NetBox documentation +labels: ["type: documentation"] +body: + - type: dropdown + attributes: + label: Change Type + description: What type of change are you proposing? + options: + - Addition + - Correction + - Removal + - Cleanup (formatting, typos, etc.) + validations: + required: true + - type: dropdown + attributes: + label: Area + description: To what section of the documentation does this change primarily pertain? + options: + - Features + - Installation/upgrade + - Getting started + - Configuration + - Development + - Other + validations: + required: true + - type: textarea + attributes: + label: Proposed Changes + description: Describe the proposed changes and why they are necessary. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 00000000..a0efa19b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,59 @@ +--- +name: ✨ Feature Request +description: Propose a new pynetbox feature or enhancement +labels: ["type: feature"] +body: + - type: markdown + attributes: + value: > + **NOTE:** This form is only for submitting well-formed proposals to extend or modify + pynetbox in some way. If you're trying to solve a problem but can't figure out how, or if + you still need time to work on the details of a proposed new feature, please start a + [discussion](https://github.com/netbox-community/pynetbox/discussions) instead. + - type: input + attributes: + label: pynetbox version + description: What version of pynetbox are you currently running? + placeholder: v7.1.0 + validations: + required: true + - type: input + attributes: + label: NetBox version + description: What version of NetBox are you currently running? + placeholder: v3.5.8 + validations: + required: true + - type: dropdown + attributes: + label: Feature type + options: + - Data model extension + - New functionality + - Change to existing functionality + validations: + required: true + - type: textarea + attributes: + label: Proposed functionality + description: > + Describe in detail the new feature or behavior you are proposing. Include any specific changes + to work flows, data models, and/or the user interface. The more detail you provide here, the + greater chance your proposal has of being discussed. Feature requests which don't include an + actionable implementation plan will be rejected. + validations: + required: true + - type: textarea + attributes: + label: Use case + description: > + Explain how adding this functionality would benefit NetBox users. What need does it address? + validations: + required: true + - type: textarea + attributes: + label: External dependencies + description: > + List any new dependencies on external libraries or services that this new feature would + introduce. For example, does the proposal require the installation of a new Python package? + (Not all new features introduce new dependencies.) diff --git a/.github/ISSUE_TEMPLATE/housekeeping.yaml b/.github/ISSUE_TEMPLATE/housekeeping.yaml new file mode 100644 index 00000000..77787139 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/housekeeping.yaml @@ -0,0 +1,24 @@ +--- +name: 🏡 Housekeeping +description: A change pertaining to the codebase itself (developers only) +labels: ["type: housekeeping"] +body: + - type: markdown + attributes: + value: > + **NOTE:** This template is for use by maintainers only. Please do not submit + an issue using this template unless you have been specifically asked to do so. + - type: textarea + attributes: + label: Proposed Changes + description: > + Describe in detail the new feature or behavior you'd like to propose. + Include any specific changes to work flows, data models, or the user interface. + validations: + required: true + - type: textarea + attributes: + label: Justification + description: Please provide justification for the proposed change(s). + validations: + required: true From 20b5e66911f943feaa6023a2841e52d1febe06a0 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Mon, 28 Aug 2023 21:03:37 +0530 Subject: [PATCH 2/6] adds pr templates --- .github/PULL_REQUEST_TEMPLATE.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..b9b8ef68 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ + +### Fixes: #1234 + + From 0b46e539ee26b356b4f0eb3901e0e98e2946521e Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Mon, 28 Aug 2023 21:03:54 +0530 Subject: [PATCH 3/6] adds lock and stale workflows --- .github/workflows/lock.yml | 21 +++++++++++++++++ .github/workflows/stale.yml | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .github/workflows/lock.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 00000000..6019cef5 --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,21 @@ +# lock-threads (https://github.com/marketplace/actions/lock-threads) +name: 'Lock threads' + +on: + schedule: + - cron: '0 3 * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + lock: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v3 + with: + issue-inactive-days: 90 + pr-inactive-days: 30 + issue-lock-reason: 'resolved' diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..3b37aae5 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,45 @@ +# close-stale-issues (https://github.com/marketplace/actions/close-stale-issues) +name: 'Close stale issues/PRs' + +on: + schedule: + - cron: '0 4 * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v6 + with: + close-issue-message: > + This issue has been automatically closed due to lack of activity. In an + effort to reduce noise, please do not comment any further. Note that the + core maintainers may elect to reopen this issue at a later date if deemed + necessary. + close-pr-message: > + This PR has been automatically closed due to lack of activity. + days-before-stale: 90 + days-before-close: 30 + exempt-issue-labels: 'status: accepted,status: blocked,status: needs milestone' + operations-per-run: 100 + remove-stale-when-updated: false + stale-issue-label: 'pending closure' + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. NetBox + is governed by a small group of core maintainers which means not all opened + issues may receive direct feedback. **Do not** attempt to circumvent this + process by "bumping" the issue; doing so will result in its immediate closure + and you may be barred from participating in any future discussions. Please see + our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md). + stale-pr-label: 'pending closure' + stale-pr-message: > + This PR has been automatically marked as stale because it has not had + recent activity. It will be closed automatically if no further action is + taken. From a03f3be4368b597062031ddf125b9072fa7add91 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Tue, 29 Aug 2023 00:14:36 +0530 Subject: [PATCH 4/6] more updates --- .github/ISSUE_TEMPLATE/bug_report.yaml | 20 ++++++--- .../ISSUE_TEMPLATE/documentation_change.yaml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- .github/workflows/lock.yml | 21 --------- .github/workflows/stale.yml | 45 ------------------- 5 files changed, 16 insertions(+), 74 deletions(-) delete mode 100644 .github/workflows/lock.yml delete mode 100644 .github/workflows/stale.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index b6006c83..7795a6eb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -36,12 +36,20 @@ body: attributes: label: Steps to Reproduce description: > - Describe in detail the exact steps that someone else can take to - reproduce this bug using the current stable release of NetBox. Begin with the - creation of any necessary database objects and call out every operation being - performed explicitly. Additionally, **do not rely on the demo instance** for - reproducing suspected bugs, as its data is prone to modification or deletion - at any time. + Please provide a minimal working example to demonstrate the bug. Begin with the + initialization of any necessary database objects and clearly enumerate each + operation carried out. Ensure that your example is as concise as possible + while adequately illustrating the issue. For example: + ```python + >>> import pynetbox + >>> nb = pynebox.api('https://netbox.example.com', token='my-token') + + ``` + Note: **do not utilize the demo instance** for replicating suspected bugs, + as its data is subject to change or removal at any time. + + _Please refrain from including any confidential or sensitive + information in your example._ validations: required: true - type: textarea diff --git a/.github/ISSUE_TEMPLATE/documentation_change.yaml b/.github/ISSUE_TEMPLATE/documentation_change.yaml index 86cc7e75..f1e27fbb 100644 --- a/.github/ISSUE_TEMPLATE/documentation_change.yaml +++ b/.github/ISSUE_TEMPLATE/documentation_change.yaml @@ -1,6 +1,6 @@ --- name: 📖 Documentation Change -description: Suggest an addition or modification to the NetBox documentation +description: Suggest an addition or modification to the pynetbox documentation labels: ["type: documentation"] body: - type: dropdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index a0efa19b..d25842a3 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -47,7 +47,7 @@ body: attributes: label: Use case description: > - Explain how adding this functionality would benefit NetBox users. What need does it address? + Explain how adding this functionality would benefit pynetbox users. What need does it address? validations: required: true - type: textarea diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml deleted file mode 100644 index 6019cef5..00000000 --- a/.github/workflows/lock.yml +++ /dev/null @@ -1,21 +0,0 @@ -# lock-threads (https://github.com/marketplace/actions/lock-threads) -name: 'Lock threads' - -on: - schedule: - - cron: '0 3 * * *' - workflow_dispatch: - -permissions: - issues: write - pull-requests: write - -jobs: - lock: - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v3 - with: - issue-inactive-days: 90 - pr-inactive-days: 30 - issue-lock-reason: 'resolved' diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 3b37aae5..00000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,45 +0,0 @@ -# close-stale-issues (https://github.com/marketplace/actions/close-stale-issues) -name: 'Close stale issues/PRs' - -on: - schedule: - - cron: '0 4 * * *' - workflow_dispatch: - -permissions: - issues: write - pull-requests: write - -jobs: - stale: - - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v6 - with: - close-issue-message: > - This issue has been automatically closed due to lack of activity. In an - effort to reduce noise, please do not comment any further. Note that the - core maintainers may elect to reopen this issue at a later date if deemed - necessary. - close-pr-message: > - This PR has been automatically closed due to lack of activity. - days-before-stale: 90 - days-before-close: 30 - exempt-issue-labels: 'status: accepted,status: blocked,status: needs milestone' - operations-per-run: 100 - remove-stale-when-updated: false - stale-issue-label: 'pending closure' - stale-issue-message: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. NetBox - is governed by a small group of core maintainers which means not all opened - issues may receive direct feedback. **Do not** attempt to circumvent this - process by "bumping" the issue; doing so will result in its immediate closure - and you may be barred from participating in any future discussions. Please see - our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md). - stale-pr-label: 'pending closure' - stale-pr-message: > - This PR has been automatically marked as stale because it has not had - recent activity. It will be closed automatically if no further action is - taken. From f76ebb8bda41f281db78554f4ecce409fabffcbc Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Tue, 29 Aug 2023 00:24:58 +0530 Subject: [PATCH 5/6] updated dropdown for doc options --- .github/ISSUE_TEMPLATE/documentation_change.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/documentation_change.yaml b/.github/ISSUE_TEMPLATE/documentation_change.yaml index f1e27fbb..dda25d84 100644 --- a/.github/ISSUE_TEMPLATE/documentation_change.yaml +++ b/.github/ISSUE_TEMPLATE/documentation_change.yaml @@ -19,11 +19,10 @@ body: label: Area description: To what section of the documentation does this change primarily pertain? options: - - Features - - Installation/upgrade - - Getting started - - Configuration - - Development + - Endpoint + - Response + - Request + - IPAM - Other validations: required: true From df137fa472e8d3aa00c02582ba4614d0dca2e028 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Tue, 29 Aug 2023 00:29:02 +0530 Subject: [PATCH 6/6] rewrite expected behavior --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 7795a6eb..eb3751d1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -56,7 +56,7 @@ body: attributes: label: Expected Behavior description: What did you expect to happen? - placeholder: A new widget should have been created with the specified attributes + placeholder: The script should execute without raising any errors or exceptions validations: required: true - type: textarea