{"id":15172582,"url":"https://github.com/nakamura196/drupal-module-github_webhook","last_synced_at":"2026-04-04T06:34:55.883Z","repository":{"id":253844424,"uuid":"844434889","full_name":"nakamura196/Drupal-module-github_webhook","owner":"nakamura196","description":"A module to send POST request to GitHub when a button is clicked.","archived":false,"fork":false,"pushed_at":"2025-05-27T22:51:12.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-12T22:36:35.151Z","etag":null,"topics":["drupal","github"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nakamura196.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"nakamura196","ko_fi":"nakamura196"}},"created_at":"2024-08-19T08:53:23.000Z","updated_at":"2025-05-27T22:51:16.000Z","dependencies_parsed_at":"2024-08-19T23:39:53.031Z","dependency_job_id":"10687a67-2e10-4a53-9a53-7b63742afd66","html_url":"https://github.com/nakamura196/Drupal-module-github_webhook","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.5,"last_synced_commit":"39927fbf009e47b0503056497ef1ff0b02acfe78"},"previous_names":["nakamura196/drupal-module-github_webhook"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nakamura196/Drupal-module-github_webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakamura196%2FDrupal-module-github_webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakamura196%2FDrupal-module-github_webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakamura196%2FDrupal-module-github_webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakamura196%2FDrupal-module-github_webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nakamura196","download_url":"https://codeload.github.com/nakamura196/Drupal-module-github_webhook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakamura196%2FDrupal-module-github_webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273385432,"owners_count":25096087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drupal","github"],"created_at":"2024-09-27T10:01:31.584Z","updated_at":"2026-04-04T06:34:55.873Z","avatar_url":"https://github.com/nakamura196.png","language":"PHP","funding_links":["https://github.com/sponsors/nakamura196","https://ko-fi.com/nakamura196"],"categories":[],"sub_categories":[],"readme":"# Deploy Trigger\n\nTrigger deployments on GitHub Actions and Vercel from the Drupal admin UI.\n\nThis module allows site administrators to configure GitHub repositories and\nVercel projects, then trigger deployments with a single click. It supports\nreal-time status monitoring and cancellation of running deployments.\n\n## Requirements\n\n- Drupal 11\n- PHP 8.3 or higher\n- **For GitHub:** A [fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens)\n  with the following repository permissions:\n  - **Contents: Read and write** (required — for triggering `repository_dispatch`)\n  - **Actions: Read and write** (optional — for status monitoring and cancellation)\n- **For Vercel:** A [Deploy Hook URL](https://vercel.com/docs/deployments/deploy-hooks)\n  and optionally a [Vercel API token](https://vercel.com/docs/rest-api#creating-an-access-token)\n  for status monitoring\n- **Optional:** [Key](https://www.drupal.org/project/key) module for secure\n  token storage\n\n## Installation\n\nInstall as you would normally install a contributed Drupal module.\nSee [Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules)\nfor further information.\n\n## Configuration\n\nNavigate to **Configuration \u003e Web services \u003e Deploy Trigger**\n(`/admin/config/services/deploy-trigger`).\n\nThe \"administer deploy trigger\" permission is required to access the settings.\nAssign this permission at **People \u003e Permissions**.\n\n### GitHub Repositories\n\n1. Go to the **GitHub Repositories** tab.\n2. Click **Add repository** and fill in the fields:\n   - **Owner** (required) — The GitHub user or organization name (e.g., `my-org`).\n   - **Repo** (required) — The repository name (e.g., `my-repo`).\n   - **GitHub Token** (required) — A fine-grained personal access token.\n     The saved token is never displayed back in the form.\n   - **Event Type** (required) — The `event_type` string sent in the dispatch payload\n     (default: `webhook`).\n   - **Label** — Display name for the repository.\n   - **Workflow File** — Filter status display to a specific workflow\n     (e.g., `deploy.yml`).\n3. Click **Submit** to save.\n\n### Vercel Projects\n\n1. Go to the **Vercel Projects** tab.\n2. Click **Add project** and fill in the fields:\n   - **Deploy Hook URL** (required) — The Vercel Deploy Hook URL. This is a\n     secret and will be stored securely.\n   - **Label** — Display name for the project.\n   - **Project ID** — Vercel project ID for status monitoring.\n   - **Vercel Token** — API token for status monitoring and cancellation.\n     Not required if you only need to trigger deploys.\n3. Click **Submit** to save.\n\n### Secure token storage with Key module\n\nIf the [Key](https://www.drupal.org/project/key) module is installed, each\nrepository or project can use a key instead of a manually entered token:\n\n1. Install and enable the Key module (`composer require drupal/key \u0026\u0026 drush en key`).\n2. Add a key at **Configuration \u003e Keys** (`/admin/config/system/keys`) with\n   your token as the value.\n3. In the settings, set **Token Source** to **Key module** and select the key\n   from the dropdown.\n\nThis prevents the token from being stored in the Drupal database and keeps it\nout of configuration exports (`drush config:export`).\n\n### Auto Trigger\n\n1. Go to the **Auto Trigger** tab.\n2. Enable **Enable Auto Trigger**.\n3. Select which content types should trigger deployments on save.\n4. Select which GitHub repositories and/or Vercel projects to trigger.\n\n## Usage\n\n1. Go to the **Trigger** tab (`/admin/config/services/deploy-trigger`).\n2. Select a deploy target from the dropdown (GitHub repositories and Vercel\n   projects are combined in one list).\n3. Click **Trigger Deploy**.\n4. The status of recent runs is displayed below with real-time polling.\n5. Active runs can be cancelled with the **Cancel** button.\n\n### GitHub Actions example\n\nTo receive the dispatched event in a GitHub Actions workflow:\n\n```yaml\non:\n  repository_dispatch:\n    types: [webhook]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - run: echo \"Triggered by Drupal\"\n```\n\n### Vercel Deploy Hook example\n\nCreate a Deploy Hook in your Vercel project settings:\n\n1. Go to your Vercel project **Settings \u003e Git \u003e Deploy Hooks**.\n2. Create a hook with a name and branch.\n3. Copy the generated URL into the Deploy Trigger settings.\n\n## Permissions\n\n| Permission | Description |\n|---|---|\n| Administer Deploy Trigger | Configure repositories, projects, tokens, and auto-trigger settings |\n| Trigger Deploy | Trigger deployments on GitHub Actions and Vercel |\n\n## License\n\nThis project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE)\nfile for details.\n\n---\n\n# Deploy Trigger (日本語)\n\nDrupal の管理画面から GitHub Actions と Vercel のデプロイをトリガーするモジュールです。\n\nサイト管理者が GitHub リポジトリや Vercel プロジェクトを設定し、ボタン一つでデプロイを\n実行できます。リアルタイムのステータス監視と実行中デプロイのキャンセルにも対応しています。\n\n## 要件\n\n- Drupal 11\n- PHP 8.3 以上\n- **GitHub 用:** [Fine-grained パーソナルアクセストークン](https://docs.github.com/ja/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens)\n  （以下のリポジトリ権限が必要）:\n  - **Contents: Read and write**（必須 — `repository_dispatch` のトリガーに必要）\n  - **Actions: Read and write**（任意 — ステータス監視とキャンセルに必要）\n- **Vercel 用:** [Deploy Hook URL](https://vercel.com/docs/deployments/deploy-hooks)\n  および、ステータス監視用に [Vercel API トークン](https://vercel.com/docs/rest-api#creating-an-access-token)（任意）\n- **任意:** トークンを安全に保管するための [Key](https://www.drupal.org/project/key) モジュール\n\n## インストール\n\n通常の Drupal モジュールと同じ手順でインストールしてください。\n詳しくは [Drupal モジュールのインストール](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules) を参照してください。\n\n## 設定\n\n**環境設定 \u003e Web services \u003e Deploy Trigger**\n(`/admin/config/services/deploy-trigger`) に移動します。\n\n設定ページへのアクセスには「administer deploy trigger」権限が必要です。\n**ユーザー \u003e 権限** から権限を付与してください。\n\n### GitHub リポジトリ\n\n1. **GitHub Repositories** タブに移動します。\n2. **Add repository** をクリックし、以下の項目を入力します:\n   - **Owner**（必須）— GitHub ユーザー名または組織名（例: `my-org`）\n   - **Repo**（必須）— リポジトリ名（例: `my-repo`）\n   - **GitHub Token**（必須）— Fine-grained パーソナルアクセストークン。\n     保存済みトークンはフォームに表示されません。\n   - **Event Type**（必須）— ディスパッチペイロードの `event_type` 文字列（デフォルト: `webhook`）\n   - **Label** — リポジトリの表示名\n   - **Workflow File** — ステータス表示を絞り込むワークフローファイル名（例: `deploy.yml`）\n3. **Submit** をクリックして保存します。\n\n### Vercel プロジェクト\n\n1. **Vercel Projects** タブに移動します。\n2. **Add project** をクリックし、以下の項目を入力します:\n   - **Deploy Hook URL**（必須）— Vercel のデプロイフック URL。秘密情報として安全に保存されます。\n   - **Label** — プロジェクトの表示名\n   - **Project ID** — ステータス監視用の Vercel プロジェクト ID\n   - **Vercel Token** — ステータス監視・キャンセル用の API トークン。\n     デプロイのトリガーのみの場合は不要です。\n3. **Submit** をクリックして保存します。\n\n### Key モジュールによる安全なトークン保管\n\n[Key](https://www.drupal.org/project/key) モジュールがインストールされている場合、\n手動入力の代わりにキーを使用してトークンを管理できます。\n\n1. Key モジュールをインストールして有効化します\n   (`composer require drupal/key \u0026\u0026 drush en key`)。\n2. **環境設定 \u003e Keys** (`/admin/config/system/keys`) でキーを追加し、\n   トークンを値として設定します。\n3. 設定画面で **Token Source** を **Key module** に変更し、\n   ドロップダウンからキーを選択します。\n\nこれにより、トークンが Drupal のデータベースに保存されなくなり、\n設定エクスポート (`drush config:export`) にも含まれなくなります。\n\n### 自動トリガー\n\n1. **Auto Trigger** タブに移動します。\n2. **Enable Auto Trigger** を有効にします。\n3. 保存時にデプロイをトリガーするコンテンツタイプを選択します。\n4. トリガー対象の GitHub リポジトリおよび Vercel プロジェクトを選択します。\n\n## 使い方\n\n1. **Trigger** タブ (`/admin/config/services/deploy-trigger`) にアクセスします。\n2. ドロップダウンからデプロイターゲットを選択します（GitHub リポジトリと Vercel\n   プロジェクトが統合されたリストです）。\n3. **Trigger Deploy** をクリックします。\n4. 最近の実行ステータスがリアルタイムポーリングで表示されます。\n5. 実行中のデプロイは **Cancel** ボタンでキャンセルできます。\n\n### GitHub Actions の連携例\n\nGitHub Actions ワークフローでディスパッチイベントを受信するには:\n\n```yaml\non:\n  repository_dispatch:\n    types: [webhook]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - run: echo \"Triggered by Drupal\"\n```\n\n### Vercel Deploy Hook の設定例\n\nVercel プロジェクトの設定で Deploy Hook を作成します:\n\n1. Vercel プロジェクトの **Settings \u003e Git \u003e Deploy Hooks** に移動します。\n2. 名前とブランチを指定してフックを作成します。\n3. 生成された URL を Deploy Trigger の設定に入力します。\n\n## 権限\n\n| 権限 | 説明 |\n|---|---|\n| Administer Deploy Trigger | リポジトリ、プロジェクト、トークン、自動トリガーの設定 |\n| Trigger Deploy | GitHub Actions と Vercel のデプロイをトリガー |\n\n## ライセンス\n\nこのプロジェクトは Apache License 2.0 の下で公開されています。詳細は [LICENSE](LICENSE) ファイルを参照してください。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnakamura196%2Fdrupal-module-github_webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnakamura196%2Fdrupal-module-github_webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnakamura196%2Fdrupal-module-github_webhook/lists"}