{"id":15714353,"url":"https://github.com/m-mizutani/nounify","last_synced_at":"2026-02-08T05:01:51.170Z","repository":{"id":246995703,"uuid":"821780765","full_name":"m-mizutani/nounify","owner":"m-mizutani","description":"The unified customizable notification service for all HTTP requests with Rego","archived":false,"fork":false,"pushed_at":"2024-12-14T00:51:37.000Z","size":140,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-22T19:45:39.230Z","etag":null,"topics":["go","rego","slack"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-mizutani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-06-29T12:15:27.000Z","updated_at":"2024-12-14T00:50:38.000Z","dependencies_parsed_at":"2025-07-29T22:36:13.910Z","dependency_job_id":"a09f4761-2e1a-4847-93be-9b313827fa09","html_url":"https://github.com/m-mizutani/nounify","commit_stats":null,"previous_names":["m-mizutani/nounify"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/m-mizutani/nounify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-mizutani%2Fnounify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-mizutani%2Fnounify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-mizutani%2Fnounify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-mizutani%2Fnounify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-mizutani","download_url":"https://codeload.github.com/m-mizutani/nounify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-mizutani%2Fnounify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29221711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T03:18:47.732Z","status":"ssl_error","status_checked_at":"2026-02-08T03:15:31.985Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["go","rego","slack"],"created_at":"2024-10-03T21:36:16.830Z","updated_at":"2026-02-08T05:01:51.156Z","avatar_url":"https://github.com/m-mizutani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nounify\n\nThe unified notification service for all HTTP requests.\n\n`nounify` can receives any notification from any services via HTTP. For example, you can send a notification from GitHub Webhooks, Google Pub/Sub, and so on. When receiving a notification via HTTP request, `nounify` validates and modifies the notification message based on Rego policies. Rego can not only permit or deny the request but also creating a new message from notification data. So you can customize the notification message for each channel.\n\n![architecture](https://github.com/m-mizutani/nounify/assets/605953/4b8b5460-85ce-42e4-a21b-90106a207134)\n\nFor example, here is a rule that converts a GitHub Webhook message to a Slack message. The rule is triggered when a new issue is opened, and the message is sent to the `#github-notify` channel with the octopus emoji.\n\n```rego\npackage schema.github_webhook\n\nmsg[{\n  \"channel\": \"github-notify\",\n  \"color\": \"#2EB67D\",\n  \"emoji\": \":octopus:\",\n  \"title\": \"New issue opened\",\n  \"body\": input.body.issue.body,\n  \"fields\": [\n    {\n      \"name\": \"Author\",\n      \"value\": input.body.issue.user.login,\n      \"link\": input.body.issue.user.html_url,\n    },\n    {\n      \"name\": \"Issue\",\n      \"value\": sprintf(\"#%d: %s\", [input.body.issue.number, input.body.issue.title]),\n      \"link\": input.body.issue.html_url,\n    },\n  ],\n}] {\n  input.header[\"X-Github-Event\"] == \"issues\"\n  input.body.action == \"opened\"\n}\n```\n\nWhen creating a new issue such as [this](https://github.com/m-mizutani/nounify/issues/2), the following message will be emitted.\n\n\u003cimg width=\"503\" alt=\"Screenshot 2024-07-03 at 12 50 24\" src=\"https://github.com/m-mizutani/octovy-deploy/assets/605953/bc6eee31-3348-4169-948b-e51c74656e4a\"\u003e\n\n## Usage\n\n### Prerequisites\n\n- Create a Slack App and get OAuth token.\n  - The app should have `chat:write`, `chat:write.customize` and `chat:write.public` scope.\n  - Install the app to your workspace.\n- If you need to receive messages from GitHub App, create a GitHub App.\n  - Enable permissions for your interest and subscribe them. See [Using webhooks with GitHub Apps](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/choosing-permissions-for-a-github-app) for more information.\n  - Install the app to your repository.\n  - Set random secret key for webhook, and keep it secret.\n\n### Deploy\n\nSet following environment variables to deploy `nounify`.\n\n- Basic settings\n  - `NOUNIFY_ADDR` (required): The address to listen to. e.g. `0.0.0.0:8080`\n  - `NOUNIFY_RULE` (required): The path to the Rego policy file. e.g. `policies.rego`\n  - `NOUNIFY_SLACK_OAUTH_TOKEN` (required): The OAuth token of Slack App. It's recommended to set the token as a secret.\n- Authentication settings\n  - `NOUNIFY_GITHUB_SECRET` (optional): The secret key for GitHub webhook. If you don't need to receive messages from GitHub, you can skip this.\n  - `NOUNIFY_GITHUB_ACTION_TOKEN` (optional): If set, nounify validates the token in `Authorization` header as `Bearer` from GitHub Actions OIDC.\n  - `NOUNIFY_GOOGLE_ID_TOKEN` (optional): If set, nounify validates the token in `Authorization` header as `Bearer` from Google ID Token.\n\nRun `nounify` with the following command.\n\n```shell\n$ nounify serve\n```\n\nSee [the example release configs](https://github.com/m-mizutani/releases/tree/main/cloud-run/nounify) with Cloud Build and Cloud Run.\n\n## Rule\n\nSee [the rule document](docs/rule.md) for more information.\n\n## License\n\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-mizutani%2Fnounify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-mizutani%2Fnounify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-mizutani%2Fnounify/lists"}