{"id":15140308,"url":"https://github.com/dessant/probot-messages","last_synced_at":"2025-09-29T08:31:53.745Z","repository":{"id":65475642,"uuid":"142037587","full_name":"dessant/probot-messages","owner":"dessant","description":"Probot extension for communicating with repository maintainers","archived":true,"fork":false,"pushed_at":"2021-01-08T11:50:36.000Z","size":221,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-12T15:39:09.802Z","etag":null,"topics":["github-api","github-issues","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dessant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-23T16:02:22.000Z","updated_at":"2024-08-11T13:55:06.000Z","dependencies_parsed_at":"2023-01-25T14:46:23.035Z","dependency_job_id":null,"html_url":"https://github.com/dessant/probot-messages","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dessant%2Fprobot-messages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dessant%2Fprobot-messages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dessant%2Fprobot-messages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dessant%2Fprobot-messages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dessant","download_url":"https://codeload.github.com/dessant/probot-messages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234604488,"owners_count":18859164,"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":["github-api","github-issues","probot","probot-extension"],"created_at":"2024-09-26T08:02:02.468Z","updated_at":"2025-09-29T08:31:48.443Z","avatar_url":"https://github.com/dessant.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Probot Messages\n\nA [Probot](https://github.com/probot/probot) extension for communicating with\nrepository maintainers. It is used for delivering messages that\nrequire user action to ensure the correct operation of the app, such as\nconfiguring the app after installation, or fixing configuration errors.\n\n## How It Works\n\nA new issue is opened for messages that don't already have an open issue,\notherwise an optional update is posted on the existing issue\nin the form of a comment.\n\n## Usage\n\n```shell\n$ npm install probot-messages\n```\n\n**Required permissions**\n\n-   Issues - Read \u0026 Write\n-   Repository metadata - Read-only\n\n#### Examples\n\nNotify maintainers about additional configuration steps.\n\n```javascript\nconst sendMessage = require('probot-messages');\n\nmodule.exports = app =\u003e {\n  app.on('installation_repositories.added', async context =\u003e {\n    for (const item of context.payload.repositories_added) {\n      const [owner, repo] = item.full_name.split('/');\n      await sendMessage(\n        app,\n        context,\n        '[{appName}] Getting started',\n        'Follow these steps to configure the app...',\n        {owner, repo}\n      );\n    }\n  });\n};\n```\n\nNotify maintainers about configuration errors.\n\n```javascript\nconst sendMessage = require('probot-messages');\n\nmodule.exports = app =\u003e {\n  app.on('push', async context =\u003e {\n    const configFile = 'config.yml';\n    try {\n      const config = await context.config(configFile);\n    } catch (error) {\n      if (error.name === 'YAMLException') {\n        await sendMessage(\n          app,\n          context,\n          '[{appName}] Configuration error',\n          '[{appName}]({appUrl}) has encountered a configuration error in ' +\n            `\\`${configFile}\\`.\\n\\`\\`\\`\\n${error.toString()}\\n\\`\\`\\``,\n          {update: 'The configuration error is still occurring.'}\n        );\n      }\n    }\n  });\n};\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### sendMessage\n\nMessages repository maintainers by submitting an issue.\n\n#### Parameters\n\n-   `app` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** app instance\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** event context\n-   `title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** issue title, `{appName}` and `{appUrl}`\n      are optional placeholders\n-   `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** issue content, `{appName}` and `{appUrl}`\n      are optional placeholders\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** options (optional, default `{}`)\n    -   `options.update` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** update to post as a comment, `{appName}`\n          and `{appUrl}` are optional placeholders, no update is posted if the value\n          is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy)\n          or the issue is locked (optional, default `''`)\n    -   `options.updateAfterDays` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** post update only if the issue\n          had no activity in this many days (optional, default `7`)\n    -   `options.owner` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** owner of the repository\n          (optional, default value inferred from `context`)\n    -   `options.repo` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** repository\n          (optional, default value inferred from `context`)\n\n#### Examples\n\n```javascript\nconst sendMessage = require('probot-messages');\n\nmodule.exports = app =\u003e {\n  app.on('issue_comment.created', async context =\u003e {\n    await sendMessage(app, context, 'Title', 'Message');\n  });\n};\n```\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\u0026lt;[Message](#message)\u003e** [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n  that will be fulfilled with a [Message](#message) object\n\n### Message\n\nDetails of the message.\n\nType: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\n\n#### Properties\n\n-   `owner` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** owner of the repository\n-   `repo` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** repository\n-   `issue` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** issue number of the message\n-   `comment` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** comment ID of the update\n-   `isNew` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** indicates if the issue was newly created\n\n## License\n\nCopyright (c) 2018-2021 Armin Sebastian\n\nThis software is released under the terms of the MIT License.\nSee the [LICENSE](LICENSE) file for further information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdessant%2Fprobot-messages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdessant%2Fprobot-messages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdessant%2Fprobot-messages/lists"}