{"id":31913203,"url":"https://github.com/woocommerce/automations","last_synced_at":"2025-10-13T18:47:48.929Z","repository":{"id":39972071,"uuid":"265043981","full_name":"woocommerce/automations","owner":"woocommerce","description":"Various GitHub Action automations to assist with repository project management.","archived":false,"fork":false,"pushed_at":"2025-06-20T12:28:56.000Z","size":3804,"stargazers_count":13,"open_issues_count":15,"forks_count":6,"subscribers_count":82,"default_branch":"trunk","last_synced_at":"2025-10-06T05:40:10.139Z","etag":null,"topics":["actions","automations","project-management"],"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/woocommerce.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-18T19:41:30.000Z","updated_at":"2025-06-20T12:29:00.000Z","dependencies_parsed_at":"2024-10-14T13:30:40.410Z","dependency_job_id":"7020654b-259d-47bf-913e-a52eaab3d24b","html_url":"https://github.com/woocommerce/automations","commit_stats":{"total_commits":263,"total_committers":12,"mean_commits":"21.916666666666668","dds":0.4828897338403042,"last_synced_commit":"ccb50c64640a931cb0f4266398ce18216132b8a4"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/woocommerce/automations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woocommerce%2Fautomations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woocommerce%2Fautomations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woocommerce%2Fautomations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woocommerce%2Fautomations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woocommerce","download_url":"https://codeload.github.com/woocommerce/automations/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woocommerce%2Fautomations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016615,"owners_count":26085853,"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-10-13T02:00:06.723Z","response_time":61,"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":["actions","automations","project-management"],"created_at":"2025-10-13T18:47:47.680Z","updated_at":"2025-10-13T18:47:48.915Z","avatar_url":"https://github.com/woocommerce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project management automation\n\nThis is a [GitHub Action](https://help.github.com/en/categories/automating-your-workflow-with-github-actions) which contains various automations to assist with project management in a GitHub repository.\n\n## Available Automations\n\n| Automation                                                       | Description                                                                                                                                                                                                                                                                        |\n| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [todos](./lib/automations/todos/README.md)                       | This automation parses for `@todo` or `@TODO` comments in code and adds formatted pull request comments for each todo found. When a pull request is merged to the main branch, issues will be created for each `@todo` in the diff if there is not already an issue for that todo. |\n| [release](./lib/automations/release/README.md)                   | This automation handles automating various parts of a somewhat opinionated release process.                                                                                                                                                                                        |\n| [assign-milestone](./lib/automations/assign-milestone/README.md) | This automation will assign the next milestone to a pull request once it has been approved.                                                                                                                                                                                        |\n\n## Installation and Usage\n\nTo use the action, include it in your workflow configuration file:\n\n```yaml\non: pull_request\njobs:\n    pull-request-automation:\n        runs-on: ubuntu-latest\n        steps:\n            - uses: woocommerce/automations@v1\n              with:\n                  github_token: ${{ secrets.GITHUB_TOKEN }}\n                  # This can be a comma delimited list of automations to run, in this case we're just executing todos\n                  automations: todos\n```\n\n## API\n\n### Inputs\n\n-   `github_token`: Required. GitHub API token to use for making API requests. This should be stored as a secret in the GitHub repository.\n-   `automations`: Optional. You can include a comma-delimited list of specific automations you want to run if you don't want to use them all in a given workflow.\n\n### Outputs\n\n_None._\n\n## Contributing\n\nThis will be expanded, but for reference:\n\n### Developing\n\n-   Clone the repo and then `npm install`.\n\n### Builds and releases\n\n-   All pushes to trunk will automatically build the `dist/index.js` file for the action (then commit and push to trunk). So no need to worry about builds.\n-   For releases, make sure you update the examples in the `README.md` if releasing a major version, otherwise just create a release manually (in the future this may get automated for releases).\n\n### Adding a new automation.\n\nThe design of this repository is setup so that automations can be their own discrete thing (eg. \"todos\") but still take advantage of various scaffolding and boilerplate when creating a new automation. The following is a rough list of steps to take to create and add a new automation:\n\n-   Create a new directory in `lib/automations` that is the name of your automation.\n-   Your `lib/automations` directory must at a minimum export the following from the `index.js` file in the directory:\n\n```js\nmodule.exports = {\n\t// the name of your automation\n\tname: 'my-automation',\n\t// what github action workflow events your automation reacts to.\n\tevents: ['pull_request'],\n\t// what github action workflow event actions your automation reacts to.\n\tactions: ['opened'],\n\t// the runner for your automation.\n\trunner,\n};\n```\n\n-   As noted above, this export must include a `runner` for your automation. The runner is an async function that will receive two arguments: `context` (which is the GitHub action context value) and `octokit` (which is the GitHub api helper). See more about these two arguments [here](https://github.com/actions/toolkit/tree/trunk/packages/github) (they are essentially what gets exposed by the `@actions/github` package). You can use the [`todos` runner as an example](https://github.com/woocommerce/automations/blob/trunk/lib/automations/todos/runner.js).\n-   Finally, in [`lib/automations.js`](https://github.com/woocommerce/automations/automations/blob/trunk/lib/automations.js), makes sure you import your automation configuration into this file and add it to the `moduleNames` array. So for example, if your automation was setup in `lib/automations/my-automation`, you would have something like this in the file after your changes:\n\n```js\nconst todos = require('./automations/todos');\nconst myAutomation = require('./automations/my-automation');\n\nconst moduleNames = [todos, myAutomation];\n\n/**\n * @typedef {import('./typedefs').AutomationTask} AutomationTask\n */\n\n/**\n * @type {AutomationTask[]}\n */\nconst automations = moduleNames.map((module) =\u003e module);\n\nmodule.exports = automations;\n```\n\n-   make sure you list your automation name and a brief description of what it does in the **Available Automations** section of this readme file.\n\nThat's it!\n\nDon't forget to add tests for your automation. There are various helpers available for mocking the `context` and `octokit` values (you can view the various todos automation tests for examples).\n\n## Credits\n\n-   Thanks to the work of the [Gutenberg team](https://github.com/wordpress/gutenberg) (particularly [@aduth](https://github.com/aduth)) in providing some inspiration for this approach to bundling various automations together.\n-   The `todos` automation was inspired by this [todo probot app](https://github.com/JasonEtco/todo). Initial iterations of this action borrowed heavily from the ideas in this app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoocommerce%2Fautomations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoocommerce%2Fautomations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoocommerce%2Fautomations/lists"}