https://github.com/iyu/actions-milestone
This action add milestone to PRs
https://github.com/iyu/actions-milestone
actions github github-actions milestone typescript
Last synced: 11 months ago
JSON representation
This action add milestone to PRs
- Host: GitHub
- URL: https://github.com/iyu/actions-milestone
- Owner: iyu
- License: mit
- Created: 2019-11-29T07:10:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T10:34:29.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T15:03:11.908Z (almost 2 years ago)
- Topics: actions, github, github-actions, milestone, typescript
- Language: TypeScript
- Homepage:
- Size: 2.38 MB
- Stars: 11
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/iyu/actions-milestone)
# ActionsMilestone
This action add milestone to PRs.:hammer:
## Inputs
### `repo-token`
**required** The GITHUB_TOKEN secret.
### `configuration-path`
**required** The path for the milestone configurations. Default `".github/milestone.yml"`
*Note if the configuration is located outside of the repository, like it could be if used in a reusable workflow, the reference of
the configuration file must be defined with the `@` syntax, e.g. `".github/milestone.yml@master"`*
### `configuration-repo`
The repository where the configuration is located (default to the same repos as the action). This
input is needed when the action is used inside a reusable workflow outside of the action caller repository.
### `silent`
Be silent in case of any failures.
### `force`
Overwrite the PR's milestone if it is already set and doesn't match the one found from the config. NOTE: do nothing if there is no milestone match from the config.
### `clear`
Clear the PR's milestone if it is already set and there is no match from the configuration.
## Outputs
### `milestone`
The added/modified milestone or `null` when no milestone is set.
### `previous`
Previous milestone or `null` when no milestone was set.
## Example usage
### `.github/milestone.yml`
```yaml
base-branch:
- "(master)"
- "releases\\/(v\\d+)"
head-branch:
- "feature\\/(v\\d+)\\/.+"
```
### `.github/workflows/milestone.yml`
```yaml
name: Pull Request Milestone
on:
pull_request:
types:
- opened
jobs:
milestone:
name: Pull Request Milestone
runs-on: ubuntu-latest
steps:
- uses: iyu/actions-milestone@v1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/milestone.yml
silent: true
```