{"id":15018135,"url":"https://github.com/probot/metadata","last_synced_at":"2025-10-19T16:30:21.795Z","repository":{"id":24908406,"uuid":"102692610","full_name":"probot/metadata","owner":"probot","description":"A Probot extension to store metadata on Issues and Pull Requests","archived":false,"fork":false,"pushed_at":"2025-01-25T01:19:26.000Z","size":828,"stargazers_count":52,"open_issues_count":14,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-29T19:46:49.627Z","etag":null,"topics":["probot","probot-extension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/probot.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}},"created_at":"2017-09-07T04:49:28.000Z","updated_at":"2024-07-21T11:05:03.000Z","dependencies_parsed_at":"2024-06-01T00:38:50.822Z","dependency_job_id":"24e9b089-d3f5-4853-929a-f7a466977600","html_url":"https://github.com/probot/metadata","commit_stats":{"total_commits":81,"total_committers":15,"mean_commits":5.4,"dds":0.7283950617283951,"last_synced_commit":"f59878a9caae1a3567820b60b0a9df5844d0edac"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fmetadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fmetadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fmetadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fmetadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/probot","download_url":"https://codeload.github.com/probot/metadata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237163107,"owners_count":19265212,"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","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":["probot","probot-extension"],"created_at":"2024-09-24T19:51:29.780Z","updated_at":"2025-10-19T16:30:16.477Z","avatar_url":"https://github.com/probot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Probot: metadata\n\nA [Probot](https://github.com/probot/probot) extension to store metadata on Issues and Pull Requests.\n\n## Usage\n\n```js\nconst metadata = require('probot-metadata');\n\n// where `context` is a Probot `Context`\nawait metadata(context).set(key, value)\n\nconst value = await metadata(context).get(key)\n```\n\n## Example\n\n```js\nconst metadata = require('probot-metadata');\n\nmodule.exports = robot =\u003e {\n  robot.on('issue_comment.created', async context =\u003e {\n    match = context.payload.comment.body.match('/snooze (.*)')\n    if(match) {\n      metadata(context).set('snooze', match[1])\n    }\n  })\n}\n```\n\n## How it works\n\nThis extension is what you might call \"a hack\". GitHub doesn't have an API for storing metadata on Issues and Pull Requests, but it does have rather large comment fields. GitHub renders the comments as Markdown and will strip any unsupported HTML (including HTML comments like `\u003c!-- I can put whatever I want here --\u003e`), but still serves up the raw comment body through the API. This extension takes advantage of this \"feature\" to store JSON values on Issues and Pull Requests as HTML comments.\n\nIt will update the body of the original post and append an HTML comment with JSON values for each key. For example:\n\n```markdown\nThis is the body of the original post\n\n\u003c!-- probot = {\"json\": \"here\"} --\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobot%2Fmetadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprobot%2Fmetadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobot%2Fmetadata/lists"}