{"id":17770997,"url":"https://github.com/hustcer/milestone-action","last_synced_at":"2026-01-11T03:13:19.745Z","repository":{"id":257847664,"uuid":"871927269","full_name":"hustcer/milestone-action","owner":"hustcer","description":"A Github action to create, close milestones and set milestone to merged PRs or closed issues","archived":false,"fork":false,"pushed_at":"2024-10-24T15:12:43.000Z","size":63,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T03:11:47.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/milestone-action","language":"Nushell","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/hustcer.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":"2024-10-13T10:39:48.000Z","updated_at":"2024-10-24T15:12:16.000Z","dependencies_parsed_at":"2024-10-30T02:00:13.306Z","dependency_job_id":null,"html_url":"https://github.com/hustcer/milestone-action","commit_stats":null,"previous_names":["hustcer/milestone-action"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcer%2Fmilestone-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcer%2Fmilestone-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcer%2Fmilestone-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcer%2Fmilestone-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hustcer","download_url":"https://codeload.github.com/hustcer/milestone-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246660077,"owners_count":20813338,"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":[],"created_at":"2024-10-26T21:28:20.414Z","updated_at":"2026-01-11T03:13:19.740Z","avatar_url":"https://github.com/hustcer.png","language":"Nushell","funding_links":[],"categories":["Integrations"],"sub_categories":[],"readme":"# Milestone Action\n\n[中文说明](README.zh-CN.md)\n\n## Features\n\n- Automatically add milestones to merged PRs\n- Automatically add milestones to closed issues that have merged PR fixes\n- Create milestones with title, description, and due date\n- Close milestones by title or milestone number\n- Delete milestones by title or milestone number\n\n## Usage\n\nAutomatically associate milestones with merged PRs or closed issues that have a merged PR fix:\n\n```yaml\nname: Milestone Action\non:\n  issues:\n    types: [closed]\n  pull_request_target:\n    types: [closed]\n\n# Required permissions for the action to work\npermissions:\n  issues: write\n  pull-requests: write\n\njobs:\n  update-milestone:\n    runs-on: ubuntu-latest\n    name: Milestone Update\n    steps:\n      - name: Set Milestone for PR\n        uses: hustcer/milestone-action@v3\n        if: github.event.pull_request.merged == true\n        with:\n          action: bind-pr # `bind-pr` is the default action\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      # Bind milestone to closed issue that has a merged PR fix\n      - name: Set Milestone for Issue\n        uses: hustcer/milestone-action@v3\n        if: github.event.issue.state == 'closed'\n        with:\n          action: bind-issue\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nCreate milestone by title, description and due date:\n\n```yaml\n- name: Create Milestone\n  uses: hustcer/milestone-action@v3\n  with:\n    action: create\n    title: v1.0\n    due-on: 2025-05-01\n    description: 'The first milestone of the project.'\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nClose milestone by title or milestone number:\n\n```yaml\n- name: Close Milestone\n  uses: hustcer/milestone-action@v3\n  with:\n    action: close\n    milestone: v1.0 # Milestone title or number\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nDelete milestone by title or milestone number:\n\n```yaml\n- name: Delete Milestone\n  uses: hustcer/milestone-action@v3\n  with:\n    action: delete\n    milestone: v1.0 # Milestone title or number\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Inputs\n\n| Name               | Type    | Description                                                                                                                            |\n| ------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| action             | String  | Action to perform: create, close, delete, bind-pr, bind-issue, defaults to `bind-pr`                                                   |\n| title              | String  | Title of the milestone to create                                                                                                       |\n| due-on             | String  | Due date of the milestone to create (format: yyyy-mm-dd)                                                                               |\n| description        | String  | Description of the milestone to create                                                                                                 |\n| milestone          | String  | Title or number of the milestone to close or delete; can also be used to specify the milestone title to associate with the PR or issue |\n| force              | Boolean | If the PR or issue already has a milestone, remove it and assign a new one when they differ                                            |\n| inherit-from-issue | Boolean | Try to inherit milestone from closing issues for bind-pr action. Defaults to `true`                                                    |\n| github-token       | String  | The GitHub token to access the API for milestone management, defaults to `${{ github.token }}`                                         |\n\n### FAQ\n\n1. How can I determine which milestone to associate with a merged PR?\n\nFirst, if the PR is closed without being merged, the action will not take effect. Once the PR is merged, the milestone is determined using the following priority order:\n\n- **Priority 1:** If you explicitly specify a milestone in the input, that milestone will be used.\n- **Priority 2:** If `inherit-from-issue` is enabled (default), the action will check if the PR closes any issues. If all closing issues have the same milestone, the PR will inherit that milestone.\n- **Priority 3:** If no milestone is inherited from issues, the action will use date-based detection. If multiple open milestones exist, the action will bind to the one with the due date closest to the PR's merge date; if no such milestone exists, it will default to the earliest-created milestone based on creation date.\n\n**Example:** If Issue #1 has milestone \"1.0.0\" and PR #2 closes Issue #1, then PR #2 will automatically get milestone \"1.0.0\" when merged.\n\n2. How can I determine which milestone to associate with a closed issue?\n\nThe action will only add a milestone to a closed issue that has been resolved by a merged PR. Otherwise, the action will not add a milestone. The issue will then be assigned to the same milestone as the PR that fixed it.\n\n3. Can I disable milestone inheritance from issues?\n\nYes, you can set `inherit-from-issue: false` in the action inputs to disable this feature. When disabled, the action will only use date-based milestone detection or the explicitly specified milestone.\n\n## License\n\nLicensed under:\n\n- MIT license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcer%2Fmilestone-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhustcer%2Fmilestone-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcer%2Fmilestone-action/lists"}