mirror of https://github.com/Lissy93/dashy.git
🏗️ Actions for monitoring PR size
This commit is contained in:
parent
32195ca888
commit
5d27cd6fae
|
@ -1,12 +1,30 @@
|
||||||
# Adds a comment to new PRs, showing the compressed size and size difference of new code
|
# Adds a comment to new PRs, showing the compressed size and size difference of new code
|
||||||
name: 🌈 Get Compressed Size
|
# And labels the PR based on the number of lines changes
|
||||||
|
name: 🌈 Check PR Size
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
- uses: preactjs/compressed-size-action@v2
|
uses: actions/checkout@v2
|
||||||
|
# Find and comment with compressed size
|
||||||
|
- name: Get Compressed Size
|
||||||
|
uses: preactjs/compressed-size-action@v2
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
pattern: "./dist/**/**"
|
pattern: "./dist/**/**"
|
||||||
|
# Check number of lines of code added
|
||||||
|
- name: Label based on Lines of Code
|
||||||
|
uses: codelytv/pr-size-labeler@v1
|
||||||
|
with:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
|
xs_max_size: '10'
|
||||||
|
s_max_size: '100'
|
||||||
|
m_max_size: '500'
|
||||||
|
l_max_size: '1000'
|
||||||
|
fail_if_xl: 'false'
|
||||||
|
message_if_xl: >
|
||||||
|
It looks like this PR is very large (over 1000 lines).
|
||||||
|
Try to avoid addressing multiple issues in a single PR, and
|
||||||
|
in the future consider breaking large tasks down into smaller steps.
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Generates diagram showing file breakdown
|
||||||
|
name: 📊 Generate Repo Visualization
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # Manual dispatch
|
||||||
|
schedule:
|
||||||
|
- cron: '0 1 * * 0' # At 01:00 on Sunday.
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Update diagram
|
||||||
|
uses: githubocto/repo-visualizer@0.7.1
|
||||||
|
with:
|
||||||
|
root_path: 'src/'
|
||||||
|
output_file: docs/assets/repo-visualization.svg
|
||||||
|
excluded_paths: dist,node_modules
|
||||||
|
commit_message: ':yellow_heart: Updates repo diagram'
|
||||||
|
branch: master
|
Loading…
Reference in New Issue