Skip to content

Commit ca5ce61

Browse files
authored
Merge pull request #2784 from Flow-Launcher/add_pr_milestone_action
Add auto assign milestone GitHub action
2 parents b7c3e80 + deee215 commit ca5ce61

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.cm/gitstream.cm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,8 @@ changes:
7272
# Sum all the line removed in the PR
7373
deletions: {{ branch.diff.files_metadata | map(attr='deletions') | sum }}
7474
# Calculate the ratio of new code
75-
ratio: {{ (changes.additions / (changes.additions + changes.deletions)) * 100 | round(2) }}
75+
ratio: {{ (changes.additions / (changes.additions + changes.deletions)) * 100 | round(2) }}
76+
77+
has:
78+
screenshot_link: {{ pr.description | includes(regex=r/!\[.*\]\(.*(jpg|svg|png|gif|psd).*\)/) }}
79+
image_uploaded: {{ pr.description | includes(regex=r/<img.*src.*(jpg|svg|png|gif|psd).*>/) }}

.github/workflows/pr_milestone.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Set Milestone
2+
3+
# Assigns the earliest created milestone that matches the below glob pattern.
4+
5+
on:
6+
pull_request:
7+
types: [opened]
8+
9+
jobs:
10+
automation:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: set-milestone
15+
uses: andrefcdias/[email protected]
16+
with:
17+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
18+
milestone: "+([0-9]).+([0-9]).+([0-9])"
19+
use-expression: true

0 commit comments

Comments
 (0)