Skip to content

Commit

Permalink
repo maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Oct 12, 2024
1 parent 3933316 commit 09d199d
Show file tree
Hide file tree
Showing 16 changed files with 400 additions and 286 deletions.
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/1_verification-request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Plugin Verification Request
description: Request verification for your plugin
description: Request verification for your plugin.
title: 'Verification Request: homebridge-'
labels:
- request-verification
- pending
body:
- type: markdown
Expand All @@ -11,7 +12,7 @@ body:
attributes:
value: >
Please double check the [requirements
list](https://github.com/homebridge/verified#requirements) before
list](https://github.com/homebridge/plugins#requirements) before
submitting a request.
- type: input
id: plugin-name
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/2_icon-request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Plugin Icon Request
description: Request an icon for your verified plugin
description: Request an icon for your verified plugin.
title: 'Plugin Icon Request: homebridge-'
labels:
- request-icon
body:
- type: markdown
attributes:
Expand All @@ -10,7 +12,6 @@ body:
value: |
- A plugin must be **verified** before requesting an icon.
- Icons can only be request by the developer of a plugin.
- Verification checks will be performed on plugins requesting an icon.
- type: input
id: plugin-name
attributes:
Expand Down
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/3_transfer-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Plugin Transfer Request
description: Request to transfer your plugin into Homebridge ownership.
title: 'Transfer Request: homebridge-'
labels:
- request-transfer
body:
- type: markdown
attributes:
value: '## Basic Details'
- type: markdown
attributes:
value: |
- You must be the developer of the plugin to request the transfer.
- You must be willing to transfer the GitHub repository to the Homebridge Plugins organization.
- You must be willing to transfer the NPM package to the Homebridge organization.
- Another developer may request to maintain the plugin.
- type: input
id: plugin-name
attributes:
label: Plugin Name
description: The name of your plugin as it appears on NPM. For example `homebridge-xyz` or `@scope/homebridge-xyz`.
placeholder: homebridge-xyz
validations:
required: true
- type: input
attributes:
label: Link To GitHub Repo
placeholder: https://github.com/homebridge/homebridge-xyz
validations:
required: true
- type: markdown
attributes:
value: '## More Information'
- type: textarea
attributes:
label: More Information
description: Please provide any additional information that you want to include.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/4_maintain-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Plugin Maintain Request
description: Request to maintain a Homebridge plugin.
title: 'Maintain Request: homebridge-'
labels:
- request-maintain
body:
- type: markdown
attributes:
value: '## Basic Details'
- type: input
id: plugin-name
attributes:
label: Plugin Name
description: The name of the plugin you would like to maintain.
placeholder: homebridge-xyz
validations:
required: true
- type: textarea
attributes:
label: References
description: References to other plugins you have developed or have helped maintain.
2 changes: 1 addition & 1 deletion .github/label-commenter-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ labels:
Your plugin is now also eligible to display a *:heart: Donate* button on its tile in the Homebridge UI. See https://github.com/homebridge/homebridge/wiki/Donation-Links for instructions.
If for any reason in the future you can no longer maintain your plugin, please consider transferring it to our [unmaintained plugins repo](https://github.com/homebridge/unmaintained-plugins). We can take ownership until another willing developer comes along.
If for any reason in the future you can no longer maintain your plugin, please consider transferring it to our [Homebridge Plugins](https://github.com/homebridge-plugins) organization. We can take ownership until another willing developer comes along.
Don't forget to join the official [Homebridge Discord server](https://discord.gg/A7nCjbz), where plugin developers can get tips and advice from other developers and the Homebridge project team in the #plugin-development channel!
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issue-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.comment.body, '/check') }}
if: ${{ startsWith(github.event.comment.body, '/check') && contains(github.event.issue.labels.*.name, 'request-verification') }}
with:
labels: pending
review_remove_labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-ecosystem/action-remove-labels@v1
if: ${{ startsWith(github.event.comment.body, '/check') }}
if: ${{ startsWith(github.event.comment.body, '/check') && contains(github.event.issue.labels.*.name, 'request-verification') }}
with:
github_token: ${{ secrets.github_token }}
labels: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/label-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Label Commenter
if: ${{ contains(github.event.issue.labels.*.name, 'request-verification') }}
uses: peaceiris/actions-label-commenter@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/plugin-checks-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ on:
jobs:
check-plugin:
runs-on: ubuntu-latest
if: github.event_name == 'issues' || (github.event_name == 'issue_comment' &&
github.event.comment.body == '/check') || (github.event_name == 'workflow_dispatch' &&
inputs.plugin)
if: (github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'request-verification')) ||
(github.event_name == 'issue_comment' && github.event.comment.body == '/check' && contains(github.event.issue.labels.*.name, 'request-verification')) ||
(github.event_name == 'workflow_dispatch' && inputs.plugin)
steps:
- uses: actions/checkout@v4
- name: Install Dependencies & Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plugin-checks-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Plugin Checks (Schedule)
on:
workflow_dispatch:
schedule:
- cron: '0 0,6,12,18 * * *'
- cron: '0 0,12 * * *'

jobs:
check-plugin:
Expand Down
55 changes: 43 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,29 @@

<span align="center">

# Verified By Homebridge
# Plugins

</span>

Information and resources for Homebridge plugins.

Create [an issue](https://github.com/homebridge/plugins/issues/new/choose) to:

- request verification for your plugin
- request an icon for your verified plugin
- request a transfer of ownership for a plugin
- request to maintain an unmaintained plugin

More info on these topics can be found below.

## Plugin Verification

The **Verified By Homebridge** program allows plugin developers to get their plugins reviewed and endorsed by the Homebridge project team.

## Benefits
<details>
<summary>View/Hide Information</summary>

### Benefits

- Have your plugin reviewed by the Homebridge team.
- Increase the visibility of your plugin.
Expand All @@ -20,7 +36,7 @@ The **Verified By Homebridge** program allows plugin developers to get their plu
- Your plugin is bumped to the top of the search results in the Homebridge UI.
- You can optionally upload an icon for your plugin which will be displayed in the Homebridge UI.

## Requirements
### Requirements

The Homebridge project team will check that your plugin meets the following criteria:

Expand All @@ -43,15 +59,15 @@ The Homebridge project team will check that your plugin meets the following crit

These verification requirements were last updated on 2023-12-08. Existing verified plugins will have met the requirements at the time of verification, and not necessarily the current requirements.

## How To Request Verification
### How To Request Verification

If you would like your plugin verified, please open an [issue](https://github.com/homebridge/verified/issues/new/choose) on this repository and fill in the template. The Homebridge project team will then review your plugin and provide constructive feedback if required.
If you would like your plugin verified, please open an [issue](https://github.com/homebridge/plugins/issues/new/choose) on this repository and fill in the template. The Homebridge project team will then review your plugin and provide constructive feedback if required.

If you feel that your plugin should replace the verification status of an existing plugin, let us know and this will be dealt with on an individual basis.

If you need assistance meeting the verification requirements, please reach out on the [Homebridge Discord](https://discord.gg/A7nCjbz).

## Post Verification
### Post Verification

Once your plugin has been verified you will remain in full control of the GitHub repository and npm package. Your plugin will appear on the 'Verified By Homebridge' plugin list and the '**Verified**' badge will appear next to your plugin when the next update to the [Homebridge UI](https://github.com/oznu/homebridge-config-ui-x) is published.

Expand All @@ -71,7 +87,7 @@ You may optionally add one of the **Verified By Homebridge** badges to your plug

If you decide you no longer wish to maintain your plugin, please reach out to the Homebridge team on the [Homebridge Discord](https://discord.gg/6GUFCb). We can assist in finding a new owner, or take over the repository until a new maintainer can be found.

## Un-verification
### Un-verification

Your plugin may be subject to another review or be removed from the verification list when deemed necessary by the Homebridge team - this could be (but not limited to) the following scenarios:

Expand All @@ -83,10 +99,23 @@ We will generally do our best to contact existing developers of plugins before r
- We notice any sort of user analysis tracking in a verified plugin
- A new plugin requests verification which replaces the functionality of any existing plugin, and we notice that the existing plugin has not been maintained for an extended period of time (and we deem it likely that any contact attempt with the developer would be unsuccessful).

</details>

## Transfer to Homebridge

See the [Unmaintained Plugins](https://github.com/homebridge/plugins/wiki/Unmaintained-Plugins) wiki page for more information about transferring an unmaintained plugin to the Homebridge project.

## Maintain a Plugin

See the [Unmaintained Plugins](https://github.com/homebridge/plugins/wiki/Unmaintained-Plugins) wiki page for more information about maintaining an unmaintained plugin, and a current list of plugins that need a new maintainer.

## Verified Plugin Bundles

The purpose of this is to help make the plugin installation process faster and more reliable for verified plugins.

<details>
<summary>View/Hide Information</summary>

### Why This Is Needed

Homebridge plugins are published and distributed to the NPM registry and installed using the `npm` cli tool.
Expand All @@ -101,16 +130,16 @@ A plugin installed via a bundle from this repo can be downloaded and installed i

### How The Bundle Generation Process Works

Every 30 minutes, a job is executed using GitHub Actions to check for updates made to any [verified Homebridge plugins](https://homebridge.io/w/Verified-Plugins).
Every 24 hours, a job is executed using GitHub Actions to check for updates made to any [verified Homebridge plugins](https://homebridge.io/w/Verified-Plugins).

Plugins that require updates are then:

1. Installed using `npm` in a clean work directory, post install scripts are disabled;
2. then a `.tar.gz` bundle is created for the plugin, including all it's dependencies;
3. then a `.sha256` checksum file is generated for the bundle;
4. finally the resulting tarball and checksum file are uploaded to the [Homebridge Plugin Repo](https://github.com/homebridge/plugin-repo/releases/tag/v1).
4. finally the resulting tarball and checksum file are uploaded to [this repo](https://github.com/homebridge/plugins/releases/tag/v1.0.0).

The two most recent versions of a plugin are retained in the [Homebridge Plugin Repo](https://github.com/homebridge/plugin-repo/releases/tag/v1), older versions are purged automatically.
The two most recent versions of a plugin are retained in [this repo](https://github.com/homebridge/plugins/releases/tag/v1.0.0), older versions are purged automatically.

### How Plugins Are Installed Via Bundles

Expand Down Expand Up @@ -141,9 +170,9 @@ If at any step, the process fails, the Homebridge UI will fall back to using `np

This project may impact the download stats for plugins provided by the NPM registry.

As such download stats are available via the [download-statistics.json](https://github.com/homebridge/plugin-repo/releases/download/v1/download-statistics.json) file. This file contains the total downloads from this repo for each verified plugin, as well as the download count for each version (including old versions that have been purged).
As such download stats are available via the [download-statistics.json](https://github.com/homebridge/plugins/releases/download/v1.0.0/download-statistics.json) file. This file contains the total downloads from this repo for each verified plugin, as well as the download count for each version (including old versions that have been purged).

The `download-statistics.json` file is updated every 30 minutes.
The `download-statistics.json` file is updated every 24 hours.

If you are accessing the file programmatically, you will need add a `nonce` query string to the URL to prevent it being redirected to an older (deleted) version of the file. E.g. `/download-statistics.json?nonce=1657193776`.

Expand All @@ -161,6 +190,8 @@ The plugin will be installed directly from the NPM registry instead.

Create a pull request adding your plugin's name to the `pluginFilter: string[]` array in the [src/plugin-tarballs/index.ts](./src/plugin-tarballs/index.ts) file.

</details>

## Community

The [#plugin-development](https://discord.gg/A7nCjbz) channel in the official Homebridge Discord server is where Homebridge plugin developers can get tips and advice from other developers and the Homebridge project team.
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default antfu({
'unused-imports/no-unused-vars': ['error', { caughtErrors: 'none' }],
},
typescript: true,
yaml: true,
formatters: {
markdown: true,
},
Expand Down
Loading

0 comments on commit 09d199d

Please sign in to comment.