Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .cm/gitstream.cm
Original file line number Diff line number Diff line change
Expand Up @@ -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).*\)/) }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the purpose of these changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for gitStream, a custom function in the config I missed, resulting in gitStream bot commenting screenshot request despite already included one in PR description.

image_uploaded: {{ pr.description | includes(regex=r/<img.*src.*(jpg|svg|png|gif|psd).*>/) }}
19 changes: 19 additions & 0 deletions .github/workflows/pr_milestone.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
milestone: "+([0-9]).+([0-9]).+([0-9])"
use-expression: true