Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjdhjd committed May 21, 2024
0 parents commit 2b4c6ff
Show file tree
Hide file tree
Showing 10 changed files with 324 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Homebridge Discord Community
url: https://discord.gg/QXqfHEW
about: Ask your questions in the hunter-hydrawise channel.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Feature Request
description: Suggest an idea for an enhancement to HBHH. Please read the HBHH documentation first, including the feature options section, to verify what you're looking for isn't already implemented.
labels: enhancement
body:
- type: markdown
attributes:
value: |
### Before opening a feature request, please ensure you have read the [documentation](https://github.com/hjdhjd/homebridge-hunter-hydrawise#documentation), especially the [feature option](https://github.com/hjdhjd/homebridge-hunter-hydrawise/blob/main/docs/FeatureOptions.md) page to see if the feature you're looking for doesn't already exist.
- type: textarea
id: feature-request
attributes:
label: Describe the feature request
description: Please describe the feature you are requesting. If the feature request relates to a specific problem you are encountering, please describe the use case.
validations:
required: true
- type: textarea
id: proposed-solution
attributes:
label: Describe the proposed solution
description: Please describe the proposed solution to the problem or use case described above.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you have considered to the enhancement
description: Please describe alternative approaches you've explored or considered to address the requested feature.
validations:
required: true
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/support-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Support Request
description: Report a bug or request help. Please read the HBHH documentation before creating a support request.
body:
- type: markdown
attributes:
value: |
### Before opening a support request, please ensure you have read the [documentation](https://github.com/hjdhjd/homebridge-hunter-hydrawise#documentation). Questions and topics already addressed in the documentation, or in prior issue reports, will be closed without a response.
- type: input
id: pluginversion
attributes:
label: Homebridge Hunter Hydrawise
description: Which version of Homebridge Hunter Hydrawise (HBHR) are you running on?
placeholder: e.g. v1.1.0
validations:
required: true

- type: input
id: homebridgeos
attributes:
label: Homebridge Platform and OS
description: What hardware and operating system are you running Homebridge on?
placeholder: e.g. macOS Sonoma
validations:
required: true

- type: input
id: homebridge
attributes:
label: Homebridge Version
description: Which version of Homebridge are you running on?
placeholder: e.g. v1.7.0
validations:
required: true

- type: input
id: node
attributes:
label: Node Version
description: Which version of Node are you running on?
placeholder: e.g. v18.1.0
validations:
required: true

- type: input
id: hydrawise
attributes:
label: Hunter Hydrawise Irrigation Controller Type
description: Which Hydrawise irrigation controller do you have?
placeholder: e.g. Hunter PRO-HC PHC-1200
validations:
required: true

- type: textarea
id: what-happened
attributes:
label: Describe the problem
description: Please describe the issue you're encountering, and ensure you include steps to reproduce.
validations:
required: true

- type: textarea
id: config
attributes:
label: Homebridge HBHH JSON configuration
description: Please copy and paste your Homebridge HBHH JSON configuration. This will be automatically formatted into code, so no need for backticks.
placeholder: Paste your HBHH configuration from Homebridge (gear icon in the Homebridge webUI next to HBHH, then select JSON config). Copy and paste it here.
render: json
validations:
required: true

- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant Homebridge HBHH log output. This will be automatically formatted into code, so no need for backticks.
placeholder: Please paste the relevant log entries here.
render: shell
validations:
required: true
5 changes: 5 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Merge all dependencies as long within ${TARGET} scope (defined in workflows/dependabot-automerge.yml).
#
- match:
dependency_type: all
update_type: semver:minor
36 changes: 36 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Query daily for npm dependency updates.
#
version: 2

updates:

# Enable version updates for github-actions.
- package-ecosystem: "github-actions"

# Look for ".github/workflows" in the "root" directory.
directory: "/"

# Check for updated GitHub Actions every weekday.
schedule:
interval: "daily"

# Allow up to ten pull requests to be generated at any one time.
open-pull-requests-limit: 0

# Enable version updates for npm.
- package-ecosystem: "npm"

# Look for "package.json" and "package-lock.json" files in the "root" directory.
directory: "/"

# Check the npm registry for updates every weekday.
schedule:
interval: "daily"

# Allow up to ten pull requests to be generated at any one time.
open-pull-requests-limit: 0

# Ignore certain dependency updates.
# ignore:
# Ignore mqtt updates for now due to the breaking change in module management.
# - dependency-name: "mqtt"
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Continuous integration - validate builds when commits are made, and publish when releases are created.
#
name: "Continuous Integration"

# Run the build on all push, pull request, and release creation events.
on:
pull_request:
push:
release:
types: [ published ]
workflow_dispatch:

jobs:

# Run a validation build on LTS versions of node.
build:
name: 'Build package'

# Build only if we've received a push, manual workflow dispatch, or release event with a release tag (aka v1.2.3).
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v'))

# Create the build matrix for all the environments we're validating against.
strategy:
matrix:
node-version: [ lts/-1, lts/* ]
os: [ ubuntu-latest ]

# Specify the environments we're going to build in.
runs-on: ${{ matrix.os }}

# Execute the build activities.
steps:
- name: Checkout the repository.
uses: actions/checkout@v4

- name: Setup the node ${{ matrix.node-version }} environment.
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Build and install the package with a clean slate.
run: |
npm ci
npm run build --if-present
env:
CI: true

# Publish the release to the NPM registry.
publish-npm:
name: 'Publish package'
needs: build

# Publish only if we've received a release event and the tag starts with "v" (aka v1.2.3).
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')

# Specify the environment we're going to build in.
runs-on: ubuntu-latest

# Execute the build and publish activities.
steps:
- name: Checkout the repository.
uses: actions/checkout@v4

- name: Setup the node environment.
uses: actions/setup-node@v4
with:

# Use the oldest node LTS version that we support.
node-version: lts/-1

# Use the NPM registry.
registry-url: 'https://registry.npmjs.org/'

- name: Install the package with a clean slate.
run: npm ci

- name: Publish the package to NPM.
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
17 changes: 17 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Automerge dependency updates identified by dependabot.
#
name: Automerge Dependabot Version Updates

on:
pull_request_target:

jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.UPDATES_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/issue-stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Close stale issues after a defined period of time.
#
name: Close Stale Issues

on:
issues:
types: [reopened]
schedule:
- cron: "*/60 * * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Autoclose stale issues.
uses: actions/stale@v9
with:
days-before-close: 2
days-before-stale: 4
exempt-issue-labels: 'discussion,help wanted,long running'
exempt-pr-labels: 'awaiting-approval,work-in-progress'
remove-stale-when-updated: true
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'stale'
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. Thank you for your contributions.'
stale-pr-label: 'stale'
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
18 changes: 18 additions & 0 deletions .github/workflows/issue-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Close issues that don't conform to the issue templates.
#
name: Close Non-Conforming Issues

on:
issues:
types: [opened]

jobs:
autoclose:
runs-on: ubuntu-latest
steps:
- name: Autoclose issues that don't follow the issue templates.
uses: roots/[email protected]
with:
issue-close-message: "@${issue.user.login} - this issue is being automatically closed because it does not follow either the feature request or bug report issue template. The issue templates have been designed to help in the troubleshooting (or feature request) process. Please use them and populate it as completely as possible to streamline troubleshooting or feature request discussions."
issue-pattern: "Describe alternatives you've considered|Homebridge-hunter-hydrawise Plugin Version"
repo-token: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/lock-threads.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'Lock Threads'

on:
schedule:
- cron: '0 1 * * *'

permissions:
issues: write
pull-requests: write

concurrency:
group: lock

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-inactive-days: "2"
exclude-any-issue-labels: "discussion"
issue-comment: "This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions."
issue-lock-reason: ""
pr-inactive-days: "7"
pr-comment: "This issue is locked to prevent necroposting on closed issues. Please create a new issue for related discussion, if needed."
pr-lock-reason: ""

0 comments on commit 2b4c6ff

Please sign in to comment.