Skip to content

Commit 0b3a90e

Browse files
Copilotdavidfowljoperezr
authored
Add policy bot automation to assign milestones to pull requests based on target branch (#10684)
* Initial plan * Add auto-assign milestone workflow with documentation Co-authored-by: davidfowl <[email protected]> * Replace Python implementation with GitHub CLI and bash scripting - Eliminates Python dependency and setup step - Uses built-in GitHub CLI (`gh`) for API calls - Implements version parsing and comparison in bash - Maintains same functionality and logic as original Python version - Updates documentation to reflect new implementation approach Co-authored-by: joperezr <[email protected]> * Replace GitHub Actions workflow with policy bot automation Co-authored-by: joperezr <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: davidfowl <[email protected]> Co-authored-by: joperezr <[email protected]>
1 parent 0ca3075 commit 0b3a90e

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
id: milestoneAssignment.prClosed
2+
name: Auto Assign Milestone to Merged PRs
3+
description: Automatically assigns milestones to pull requests when they are merged based on target branch
4+
owner:
5+
resource: repository
6+
disabled: false
7+
where:
8+
configuration:
9+
resourceManagementConfiguration:
10+
eventResponderTasks:
11+
- if:
12+
- payloadType: Pull_Request
13+
- isAction:
14+
action: Closed
15+
- targetsBranch:
16+
branch: main
17+
then:
18+
- addMilestone:
19+
milestone: 9.5
20+
description: '[Milestone Assignments] Assign Milestone to PRs merged to the `main` branch'
21+
- if:
22+
- payloadType: Pull_Request
23+
- isAction:
24+
action: Closed
25+
- targetsBranch:
26+
branch: release/9.4
27+
then:
28+
- removeMilestone
29+
- addMilestone:
30+
milestone: 9.4.1
31+
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/9.4 branch'

0 commit comments

Comments
 (0)