mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #2784 from Flow-Launcher/add_pr_milestone_action
Add auto assign milestone GitHub action
This commit is contained in:
commit
ca5ce61317
2 changed files with 24 additions and 1 deletions
|
|
@ -72,4 +72,8 @@ changes:
|
|||
# Sum all the line removed in the PR
|
||||
deletions: {{ branch.diff.files_metadata | map(attr='deletions') | sum }}
|
||||
# Calculate the ratio of new code
|
||||
ratio: {{ (changes.additions / (changes.additions + changes.deletions)) * 100 | round(2) }}
|
||||
ratio: {{ (changes.additions / (changes.additions + changes.deletions)) * 100 | round(2) }}
|
||||
|
||||
has:
|
||||
screenshot_link: {{ pr.description | includes(regex=r/!\[.*\]\(.*(jpg|svg|png|gif|psd).*\)/) }}
|
||||
image_uploaded: {{ pr.description | includes(regex=r/<img.*src.*(jpg|svg|png|gif|psd).*>/) }}
|
||||
19
.github/workflows/pr_milestone.yml
vendored
Normal file
19
.github/workflows/pr_milestone.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
name: Set Milestone
|
||||
|
||||
# Assigns the earliest created milestone that matches the below glob pattern.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
automation:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: set-milestone
|
||||
uses: andrefcdias/add-to-milestone@v1.3.0
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
milestone: "+([0-9]).+([0-9]).+([0-9])"
|
||||
use-expression: true
|
||||
Loading…
Reference in a new issue