Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Switch out labeler action, define labels in workflow inline instead of by config file #31758

Merged
merged 1 commit into from
Jan 17, 2024
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
42 changes: 0 additions & 42 deletions .github/pull-request-size.yml

This file was deleted.

36 changes: 23 additions & 13 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull request labeler
name: PR labeler

on:
- pull_request_target
Expand All @@ -12,28 +12,38 @@ jobs:
label-by-path:
# do not run on forks
if: github.repository == 'mdn/content'
name: Label by path
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

# Docs: https://github.com/cbrgm/pr-size-labeler-action
# Docs: https://github.com/CodelyTV/pr-size-labeler
label-by-size:
# do not run on forks
if: github.repository == 'mdn/content'
needs: label-by-path
name: Label by size
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: codelytv/pr-size-labeler@v1
with:
persist-credentials: false

- name: Label PR based on size
uses: cbrgm/pr-size-labeler-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repository: ${{ github.repository }} # Repository name
github_pr_number: ${{ github.event.number }} # Pull request number
config_file_path: ".github/pull-request-size.yml" # Path to pr-size-labeler config
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_api_url: "https://api.github.com"
xs_label: "size/xs"
xs_max_size: "5"
s_label: "size/s"
s_max_size: "10"
m_label: "size/m"
m_max_size: "50"
l_label: "size/l"
l_max_size: "100"
xl_label: "size/xl"
fail_if_xl: "false"
# message_if_xl: >
# This PR exceeds the recommended size of 1000 lines.
# ...
files_to_ignore: |
"files/en-us/_redirects.txt"
"files/en-us/_wikihistory.json"
Loading