{"id":15139932,"url":"https://github.com/probot/attachments","last_synced_at":"2026-03-06T15:02:03.464Z","repository":{"id":53715471,"uuid":"108363196","full_name":"probot/attachments","owner":"probot","description":"A Probot extension to add message attachments to comments on GitHub","archived":false,"fork":false,"pushed_at":"2024-08-26T20:41:21.000Z","size":18,"stargazers_count":16,"open_issues_count":4,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T15:51:45.652Z","etag":null,"topics":["probot","probot-extension"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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-10-26T04:53:27.000Z","updated_at":"2024-07-21T11:05:12.000Z","dependencies_parsed_at":"2024-01-17T00:05:52.931Z","dependency_job_id":"160eeaaa-be9a-4b48-a12a-90cb3130877e","html_url":"https://github.com/probot/attachments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/probot/attachments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fattachments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fattachments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fattachments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fattachments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/probot","download_url":"https://codeload.github.com/probot/attachments/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fattachments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30182686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T14:42:24.748Z","status":"ssl_error","status_checked_at":"2026-03-06T14:42:14.925Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["probot","probot-extension"],"created_at":"2024-09-26T08:01:19.609Z","updated_at":"2026-03-06T15:02:03.427Z","avatar_url":"https://github.com/probot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Probot: attachments\n\nA [Probot](https://github.com/probot/probot) extension to add message attachments to comments on GitHub.\n\n## Usage\n\n```js\nconst attachments = require('probot-attachments')\n\nmodule.exports = robot =\u003e {\n  const events = ['issues.opened', 'pull_request.opened', 'issue_comment.created']\n  robot.on(events, context =\u003e {\n    return attachments(context).add({\n      'title': 'Hello World',\n      'title_link': 'https://example.com/hello'\n    })\n  })\n}\n```\n\n## Example\n\nHere is a probot app that listens for a comment that matches `bobby tables` and adds an attachment to the comment.\n\n```js\nconst attachments = require('probot-attachments');\n\nmodule.exports = robot =\u003e {\n  robot.on('issue_comment.created', context =\u003e {\n    if(context.payload.comment.body.match(/bobby tables/i)) {\n      return attachments(context).add({\n        'pretext': 'Let us all heed the lessons of little bobby tables:',\n        'author_name': 'Bobby Tables',\n        'author_link': 'https://xkcd.com/',\n        'author_icon': 'http://www.codetinkerer.com/assets/little-bobby-tables.png',\n        'title': 'Exploits of a Mom',\n        'title_link': 'https://xkcd.com/327/',\n        'text': 'Her daughter is named Help I\\'m trapped in a driver\\'s license factory.',\n        'image_url': 'https://imgs.xkcd.com/comics/exploits_of_a_mom.png',\n        'thumb_url': 'https://www.cmswire.com/~/media/59086df972604f35b46d0764cd0f1351.jpg',\n        'footer': 'Probot the Trollbot',\n        'footer_icon': 'https://static.comicvine.com/uploads/square_medium/8/84072/1561135-trollface.jpg',\n      })\n    }\n  })\n}\n```\n\n![](https://user-images.githubusercontent.com/173/32035934-25855d5e-b9e2-11e7-8294-58412fee915a.png)\n\n## How it works\n\nThis extension is what you might call \"a hack\". GitHub doesn't have an API for adding attachments on comments, but it does have rather large comment fields that support some HTML. This extension renders the attachment as a `blockquote` and appends it to the original comment body.\n\nThis extension is inspired by [Slack's message attachments](https://api.slack.com/docs/message-attachments).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobot%2Fattachments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprobot%2Fattachments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobot%2Fattachments/lists"}