{"id":21758500,"url":"https://github.com/skarlso/caretaker","last_synced_at":"2025-10-14T14:02:17.311Z","repository":{"id":206961858,"uuid":"718093019","full_name":"Skarlso/caretaker","owner":"Skarlso","description":"Github Project automation tool to take care of automatically moving around issues and updating their status.","archived":false,"fork":false,"pushed_at":"2024-07-15T06:26:10.000Z","size":940,"stargazers_count":6,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T12:09:51.629Z","etag":null,"topics":["github-projects","go","golang"],"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/Skarlso.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":"2023-11-13T11:12:44.000Z","updated_at":"2024-08-27T13:22:31.000Z","dependencies_parsed_at":"2024-04-28T08:33:40.508Z","dependency_job_id":"c2f40c74-a82f-4c4f-9b6c-84101871c0de","html_url":"https://github.com/Skarlso/caretaker","commit_stats":null,"previous_names":["skarlso/caretaker"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skarlso%2Fcaretaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skarlso%2Fcaretaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skarlso%2Fcaretaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skarlso%2Fcaretaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skarlso","download_url":"https://codeload.github.com/Skarlso/caretaker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710446,"owners_count":21149190,"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-projects","go","golang"],"created_at":"2024-11-26T11:22:05.442Z","updated_at":"2025-10-14T14:02:12.219Z","avatar_url":"https://github.com/Skarlso.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caretaker\n\n![caretaker](./img/caretaker_logo.png)\n\nCaretaker automates project ( beta ) based processes.\n\nThe following automation options are available at the moment of writing.\n\n| :boom: WARNING                                                                                                                                                            |\n|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Since this action can modify your organization's Project board and issue status it is recommended that you restrict access to it to organization members and maintainers. |\n\nFor example, don't allow this action to be executed on Forks of the repository.\n\n| :bulb: NOTE                                                                     |\n|:--------------------------------------------------------------------------------|\n| Caretaker allows for a maximum of 10 projects being assigned to a single Issue. |\n\n## Periodic pull request scanning\n\nCaretaker can track pull request activity. It does that by checking the last activity on the pull request.\nIt compares that date with an interval set by the user, by default 24 hours. If the last activity was later than that,\nit will automatically move any issues that are attached to the pull request into a desired **Status** ( column on a board view ).\n\nAn example action could look something like this:\n\n```yaml\nname: Scan Pull Request Activity\n\non:\n  schedule:\n    - cron:  '0 1 * * *'\n\npermissions:\n  contents: read\n  issues: read\n\njobs:\n  scan:\n    runs-on: ubuntu-latest\n    steps:\n      - name: scan pull request activity\n        uses: skarlso/caretaker@v0.1.1\n        with:\n          command: scan\n          owner: skarlso\n          repo: test\n          token: ${{ secrets.PROJECT_TOKEN }}\n          statusOption: In Review # this needs to be an option you want the issue to land in\n          pullRequestProcessedLabel: caretaker-checked # a label to mark the pull request as seen\n```\n\nIf the owner of the repository is an organization, please set `isOrganization: true` in `with`.\n\n| :bulb: Note                                                                                                                                                                                                |\n|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Caretaker comments back into a PR if it finished processing it. In order to avoid triggering the flip back flow, either ignore the actor or set up the flip flow with only pulling and submitting reviews. |\n\nThis comment can be disabled by defining `noComment: true` in the `with` section.\n\n### Required Labels\n\nCaretaker checks for a specific label to be present on the Pull Request it already checked, so it can skip it.\nThis label can be defined via `with: pullRequestProcessedLabel`. This label is _deleted_ during\n[Automatic Issue back-flipping on pull request activity](#automatic-issue-back-flipping-on-pull-request-activity).\n\n## Scanning projects\n\nCaretaker can scan projects for issues that are sitting in a column (with a specific status) for a while now.\nIt will take those issues and move them from a source column (status) into a target column (status).\n\nTo use it set the following action:\n\n```yaml\nname: Scan project board\n\non:\n  schedule:\n    - cron:  '0 1 * * *'\n\npermissions:\n  contents: read\n  issues: write\n\njobs:\n  scan:\n    runs-on: ubuntu-latest\n    steps:\n      - name: scan project\n        uses: skarlso/caretaker@v2\n        with:\n          command: scan-project\n          owner: skarlso\n          projectNumber: 2\n          scanInterval: 24h\n          token: ${{ secrets.PROJECT_TOKEN }}\n          statusOption: Closed # this needs to be an option you want the issue to land in\n          fromStatusOption: Done\n```\n\n## Automatic Issue back-flipping on pull request activity\n\nWith the following action, Caretaker can flip-back issues into a desired state upon any activity on a pull request.\nThe activity type can be defined by the action.\n\n```yaml\nname: Flip-back issues to In Progress\n\non:\n  pull_request: {}\n\njobs:\n  flip:\n    runs-on: ubuntu-latest\n    steps:\n      - name: flip any related issues\n        uses: skarlso/caretaker@v0.1.1\n        with:\n          command: pull-request-updated\n          owner: skarlso\n          repo: test\n          token: ${{ secrets.PROJECT_TOKEN }}\n          statusOption: In Progress # this needs to be an option you want the issue to land in\n          pullRequestNumber: ${{ github.event.pull_request.number }}\n```\n\n## Assigning Issues created to a Project\n\nYou can auto assign any issues that are created to a specific Project.\n\n```yaml\nname: Assign to Project\n\non:\n  issues:\n    types: [opened]\n\npermissions:\n  contents: read\n  issues: read\n\njobs:\n  assign:\n    runs-on: ubuntu-latest\n    steps:\n      - name: assign issue to project\n        uses: skarlso/caretaker@v0.1.1\n        with:\n          command: assign-issue\n          owner: skarlso\n          repo: test\n          token: ${{ secrets.PROJECT_TOKEN }}\n          issueNumber: ${{ github.event.issue.number }}\n          projectNumber: 2 # the number of the project to assign this issue to.\n```\n\n_Note_: This will be further extended to add potential default labels to the issue automatically after its creation.\n\n## Update Issue State\n\nThere is also a separate command that can be used during any other action regardless of context.\n`update-issue` can be used to set the Status of an issue.\n\n## Authentication\n\nSince ProjectV2 at the time of this writing, isn't in the scope of the GITHUB_TOKEN, a generated token must be used with\n`org` level read access.\n\n## Slash Commands\n\nIn order to trigger a slash command, leave a comment on a pull request like this:\n\n```\n/assign\n/status\n/help\n```\n\nMultiple commands can be defined using `\\n` delimiter.\n\nCaretaker will acknowledge any comment that has a slash command in it that it recognised. Then, once it's done, it will\nreact with a thumbs up. Like this:\n\n![reaction](./img/reactions.png)\n\nIf a command requires or takes arguments, those can be provided via a space separated list.\n\n```\n/status status=In Progress,extra=value\n```\n\nTo set up Slash commands configure a GitHub action like this:\n\n```yaml\nname: Watch for Slash commands.\n\non: issue_comment\n\njobs:\n  pr_commented:\n    # This job only runs for pull request comments\n    name: PR comment\n    if: ${{ github.event.issue.pull_request }}\n    steps:\n      - name: watch for slash commands from users\n        uses: skarlso/caretaker@v0.2.0\n        with:\n          command: slash\n          owner: skarlso\n          repo: test\n          token: ${{ secrets.PROJECT_TOKEN }}\n          pullRequestNumber: ${{ github.event.pull_request.number }}\n          actor: ${{ github.actor }}\n          commentBody: ${{ github.event.comment.body }}\n          commentID: ${{ github.event.comment.node_id }} # used for applying reactions\n```\n\nTo see what commands are available, simply comment on a pull request `/help` which should result in something like this:\n![help-command](img/help-command.png)\n\n## Up-coming\n\nFor any other features which might be of use, please create a `Feature Request`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskarlso%2Fcaretaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskarlso%2Fcaretaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskarlso%2Fcaretaker/lists"}