Skip to content

Commit

Permalink
Add workflow to auto-add milestones to issues/PRs
Browse files Browse the repository at this point in the history
Create a GitHub Actions workflow that automatically assigns milestones to newly
opened issues and pull requests. This uses the `benelan/milestone-action` to
manage milestones based on project configurations.
  • Loading branch information
douglatornell committed Jan 30, 2025
1 parent 4603933 commit 11e4b48
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/add-mileston-issue-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Add Milestone to Issue/PR

on:
issues:
types:
- opened
pull_request:
types:
- opened
branches:
- main

jobs:
add_milestone:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: benelan/milestone-action@v3
with:
# If true, add the milestone with the farthest due date. By default,
# the action adds the current milestone (the closest due date).
farthest: false

# If true, overwrite existing milestones on issues and pull requests.
# By default, the action exits if a milestone has already been added.
overwrite: false

# If true, add the only open milestone in a repo, even if there is no
# due date. By default, milestones with no due date are ignored.
single: false
2 changes: 2 additions & 0 deletions .github/workflows/assign-issue-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Assign Issue/PR

on:
issues:
types:
Expand All @@ -8,6 +9,7 @@ on:
types:
- reopened
- opened

jobs:
auto_assign:
permissions:
Expand Down

0 comments on commit 11e4b48

Please sign in to comment.