{"id":19816974,"url":"https://github.com/geoadmin/action-milestone-tag","last_synced_at":"2026-02-06T21:02:13.128Z","repository":{"id":37824002,"uuid":"419185093","full_name":"geoadmin/action-milestone-tag","owner":"geoadmin","description":"Github Action to tag the repository on Pull Request merge. The tag is based on the milestone title plus optionally an incremental number.","archived":false,"fork":false,"pushed_at":"2025-01-22T08:47:32.000Z","size":1605,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-11-15T06:24:00.188Z","etag":null,"topics":["action","actions","github-actions","managed-by-tf","milestone","tagging"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geoadmin.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":"2021-10-20T04:31:30.000Z","updated_at":"2025-01-22T08:46:54.000Z","dependencies_parsed_at":"2024-11-12T10:11:29.184Z","dependency_job_id":"d6db088c-65f5-465d-96aa-4e118de396f2","html_url":"https://github.com/geoadmin/action-milestone-tag","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":0.6129032258064516,"last_synced_commit":"41180583c8352a4d793e995b7762f6e3e8f6d906"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/geoadmin/action-milestone-tag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Faction-milestone-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Faction-milestone-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Faction-milestone-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Faction-milestone-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geoadmin","download_url":"https://codeload.github.com/geoadmin/action-milestone-tag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Faction-milestone-tag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29175826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T20:14:21.878Z","status":"ssl_error","status_checked_at":"2026-02-06T20:14:21.443Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["action","actions","github-actions","managed-by-tf","milestone","tagging"],"created_at":"2024-11-12T10:11:17.905Z","updated_at":"2026-02-06T21:02:13.110Z","avatar_url":"https://github.com/geoadmin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/geoadmin/action-milestone-tag/actions\"\u003e\n    \u003cimg alt=\"action-milestone-tag status\" src=\"https://github.com/geoadmin/action-milestone-tag/workflows/build-test/badge.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Create a git tag based on the attached milestone\n\n- [Description](#description)\n- [Inputs](#inputs)\n  - [Custom Tag Placeholders](#custom-tag-placeholders)\n- [Outputs](#outputs)\n- [Example usage](#example-usage)\n- [Contributing](#contributing)\n  - [Setup your environment](#setup-your-environment)\n  - [Create new Release](#create-new-release)\n  - [Validate](#validate)\n\n## Description\n\nThis github action can be used on pull request merge to tag the repository. The tag name is based on\nthe attached milestone if any or on the previous tag.\n\nYou can also use the input `custom_tag` to\nmodify the tag name by for example adding a prefix or suffix (e.g.\n`custom_tag = '${MILESTONE}_my-suffix'`).\n\nWhen your workflow requires more than one tag per milestone, you can use the `${TAG_NUMBER}`\nplaceholder in the `custom_tag`. This placeholder will then be automatically incremented based on\nthe previous tag found matching the `custom_tag`. The previous tag is search based on the milestone\ntitle attached to the PR or based on the `milestone_pattern` input (default to `.*?`).\n\n\u003e **_IMPORTANT NOTE:_** _This action only works with Pull Request and can only be used with the `pull_request` event._\n\n## Inputs\n\n\u003c!-- prettier-ignore --\u003e\n| Variable             | Type   | Default        | Description              |\n| -------------------- | ------ | -------------- | ------------------------ |\n| `github_token`       | String | -              | REQUIRED. Github token to access the repository. |\n| `custom_tag`         | String | `${MILESTONE}` | Custom tag to set. Several placeholders can be used, see [Custom Tag Placeholders](#custom-tag-placeholders). |\n| `initial_tag_number` | Number | `1`            | Initial `TAG_NUMBER` placeholder. |\n| `milestone_pattern`  | String | `.+?`          | Milestone pattern used to search for previous tag when not milestone is attached. |\n| `milestone`          | String | `''`           | Milestone value to use for tagging (overwrite the milestone attached to the PR) |\n| `dry_run`            | Bool   | `false`        | Dry run for testing, do not create the tag. |\n\n### Custom Tag Placeholders\n\n| Placeholder  | Description                                                          |\n| ------------ | -------------------------------------------------------------------- |\n| `MILESTONE`  | Milestone title attached to the Pull Request.                        |\n| `TAG_NUMBER` | Tag number, this number gets incremented if a previous tag is found. |\n\n## Outputs\n\n| Variable       | Type    | Description                                         |\n| -------------- | ------- | --------------------------------------------------- |\n| `new_tag`      | String  | New tag created.                                    |\n| `previous_tag` | String  | Previous tag if any.                                |\n| `tag_created`  | Boolean | `true` if a tag has been created, `false` otherwise |\n\n## Example usage\n\n```yaml\non:\n  pull_request:\n    types:\n      - closed\n    branches:\n      - master\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v2\n      - name: Bump Milestone Tag\n        uses: geoadmin/action-milestone-tag@v1.0.0\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          custom_tag: '${MILESTONE}_rc${TAG_NUMBER}'\n```\n\n## Contributing\n\nEvery contribution to this action is welcome ! So if you find a bug or want to add a new feature\neveryone is welcome to open an [issue](https://github.com/geoadmin/action-milestone-tag/issues) or\ncreated a [Pull Request](https://github.com/geoadmin/action-milestone-tag/pulls).\n\nAny contribution must follow the\n[git-flow](https://nvie.com/posts/a-successful-git-branching-model/#the-main-branches).\n\n### Setup your environment\n\n\u003e First, you'll need to have a reasonably modern version of `node` handy. This won't work with versions older than 9, for instance.\n\nInstall the dependencies\n\n```bash\nnpm install\n```\n\nMake sure your changes follows the formatting and linting\n\n```bash\nnpm run format-check \u0026\u0026 npm run lint\n```\n\nBuild the typescript and package it for distribution\n\n```bash\nnpm run build \u0026\u0026 npm run package\n```\n\nRun the tests :heavy_check_mark:\n\n```bash\n$ npm test\n\n PASS  ./index.test.js\n  ✓ throws invalid number (3ms)\n  ✓ wait 500 ms (504ms)\n  ✓ test runs (95ms)\n\n...\n```\n\n### Create new Release\n\nActions are run from GitHub repos so we will checkin the packed dist folder.\n\n1. First make sure the version in `package.json` match the next release version, if not update it.\n2. Then build the project, package it and push the changes as follow:\n\n   ```bash\n   npm run all\n   git add dist\n   git commit -a -m \"prod dependencies\"\n   git push origin feature-your-feature\n   ```\n\n3. Create a PR to merge this in `develop` branch\n4. Once the PR above has been merged, create a new Release PR to merge `develop` into `master`\n\n### Validate\n\nYou can now validate the action by referencing `./` in a workflow in your repo (see [test.yml](.github/workflows/test.yml))\n\n```yaml\nuses: ./\nwith:\n  github_token: ${{ secrets.GITHUB_TOKEN }}\n  dry_run: true\n```\n\nSee the [actions tab](https://github.com/geoadmin/action-milestone-tag/actions) for runs of this action! :rocket:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Faction-milestone-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoadmin%2Faction-milestone-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Faction-milestone-tag/lists"}