{"id":19671444,"url":"https://github.com/multitheftauto/stale-action","last_synced_at":"2026-05-06T13:05:38.460Z","repository":{"id":42482955,"uuid":"445343192","full_name":"multitheftauto/stale-action","owner":"multitheftauto","description":"Notifies and then closes draft pull requests that have had no activity for a specified amount of time.","archived":false,"fork":false,"pushed_at":"2023-07-19T07:34:39.000Z","size":856,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T04:20:47.870Z","etag":null,"topics":["actions","github","github-actions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/multitheftauto.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}},"created_at":"2022-01-06T23:48:16.000Z","updated_at":"2023-06-25T16:45:33.000Z","dependencies_parsed_at":"2023-01-31T19:45:56.053Z","dependency_job_id":"47017c5b-1d6a-4c24-84de-f9038cb42987","html_url":"https://github.com/multitheftauto/stale-action","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":0.05555555555555558,"last_synced_commit":"2e3acc2a7d262d3a262125f9ea84f71a052aa029"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multitheftauto%2Fstale-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multitheftauto%2Fstale-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multitheftauto%2Fstale-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multitheftauto%2Fstale-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multitheftauto","download_url":"https://codeload.github.com/multitheftauto/stale-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239358562,"owners_count":19625511,"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":["actions","github","github-actions"],"created_at":"2024-11-11T17:08:49.081Z","updated_at":"2026-05-06T13:05:33.435Z","avatar_url":"https://github.com/multitheftauto.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Close Stale Draft Pull Requests\n\nThis action has been inspired by [microsoft/vscode-github-triage-actions](https://github.com/microsoft/vscode-github-triage-actions), [actions/stale](https://github.com/actions/stale) and [probot/stale](https://github.com/probot/stale), ultimately written from scratch for our use using newer versions of the APIs, but same or similar configuration syntax and linting options enabled.\n\nNotifies and then closes draft pull requests that have had no activity for a specified amount of time.\n\nThe configuration must be on the default branch and the default values will:\n\n- Add a label \"stale\" on draft pull requests after 90 days of inactivity\n- Close the stale draft pull requests after 30 days of inactivity\n- If an update/comment occur on stale draft pull requests, the stale label will be removed and the timer will restart\n\n## Todos\n\n- Automatically generate accurate TypeScript definitions from GraphQL schemas\n\n## Recommended permissions\n\nFor the execution of this action, it must be able to fetch all pull requests from your repository.\nIn addition, based on the provided configuration, the action could require more permission(s) (e.g. create label, add label, comment, close, etc.)\nThis can be achieved with the following [configuration in the top level of the action](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions) if the permissions are restricted:\n\n```yaml\npermissions:\n  pull-requests: write\n```\n\n## All options\n\n### List of input options\n\nEvery argument is optional.\n\n| Input                                                     | Description                                                                                                        | Default               |\n| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------- |\n| [close-pr-message](#close-pr-message)                     | The message to post on the stale draft pull request that is being closed.                                          |                       |\n| [days-before-pr-close](#days-before-pr-close)             | The number of days to wait to close a pull request after it being marked stale with no activity afterwards.        | 30                    |\n| [days-before-pr-stale](#days-before-pr-stale)             | The number of days old a draft pull request can be before marking it stale.                                        | 90                    |\n| [ignored-label](#ignored-label)                           | Draft pull requests with this label will not be processed.                                                         |                       |\n| [repo-token](#repo-token)                                 | Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.                                     | `${{ github.token }}` |\n| [stale-pr-label](#stale-pr-label)                         | The label to apply when a draft pull request is stale.                                                             | `stale`               |\n| [stale-pr-label-color](#stale-pr-label-color)             | A 6 character hex code, without the leading #, identifying the color of the stale label if it needs to be created. | `555555`              |\n| [stale-pr-label-description](#stale-pr-label-description) | A description for the stale label if the label needs to be created.                                                |                       |\n| [stale-pr-message](#stale-pr-message)                     | The message to post on the stale draft pull request that is being labeled.                                         |                       |\n\n### List of output options\n\n| Output       | Description                                   |\n| ------------ | --------------------------------------------- |\n| closed-prs   | List of all new closed draft pull requests.   |\n| staled-prs   | List of all new staled draft pull requests.   |\n| unstaled-prs | List of all new unstaled draft pull requests. |\n\n### Usage\n\nSee also [action.yml](./action.yml) for a comprehensive list of all the options.\n\nBasic:\n\n```yaml\nname: 'Stale draft PR handler'\non:\n  workflow_dispatch:\n  schedule:\n    # Daily\n    - cron: '0 0 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: multitheftauto/stale-action@main\n        with:\n          close-pr-message: 'This draft pull request was closed because it has been marked stale for 30 days with no activity.'\n          stale-pr-message: 'This draft pull request is stale because it has been open for at least 90 days with no activity. Please continue on your draft pull request or it will be closed in 30 days automatically.'\n```\n\nConfigure stale timeouts:\n\n```yaml\nname: 'Stale draft PR handler'\non:\n  workflow_dispatch:\n  schedule:\n    # Daily\n    - cron: '0 0 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: multitheftauto/stale-action@main\n        with:\n          close-pr-message: 'This draft pull request was closed because it has been marked stale for 5 days with no activity.'\n          days-before-pr-close: 5\n          days-before-pr-stale: 30\n          stale-pr-message: 'This draft pull request is stale because it has been open for at least 30 days with no activity. Please continue on your draft pull request or it will be closed in 5 days automatically.'\n```\n\nIgnore a specific label from being processed:\n\n```yaml\nname: 'Stale draft PR handler'\non:\n  workflow_dispatch:\n  schedule:\n    # Daily\n    - cron: '0 0 * * *'\n\njobs:\n  stale:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: multitheftauto/stale-action@main\n        with:\n          ignored-label: 'keep'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultitheftauto%2Fstale-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultitheftauto%2Fstale-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultitheftauto%2Fstale-action/lists"}