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: update readme #107

Merged
merged 3 commits into from
Jan 1, 2022
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
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,20 @@ updates:
directory: '/'
schedule:
interval: 'monthly'
ignore:
- dependency-name: "@types/*"
- dependency-name: "eslint"
- dependency-name: "eslint-*"
- dependency-name: "typescript"
- dependency-name: "jest"
- dependency-name: "jest-*"
versioning-strategy: 'increase'
commit-message:
prefix: "chore(deps): "

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
commit-message:
prefix: "chore(deps): "
6 changes: 6 additions & 0 deletions .github/workflows/ci-use.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
issues:
issue_comment:

permissions:
contents: read
issues: write
pull-requests: write
statuses: write

jobs:
uses:
name: Uses
Expand Down
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
Multi labeler for title, body, comments, commit messages, branch, author or files. Optionally, generate a status check
based on the labels.

## Features
[Who is using `fuxingloh/multi-labeler`?](https://github.com/search?o=desc&q=fuxingloh+%2F+multi-labeler&s=indexed&type=Code)

> **Psst!** For a more wholesome OSS governance solution check out [DeFiCh/oss-governance-bot](https://github.com/DeFiCh/oss-governance-bot). I am also the main contributor for the GitHub Action.
## Features

- Single compiled javascript file, extremely fast. Use fewer credits!
- Append based multi-labeler, using `.github/labeler.yml` as config.
Expand All @@ -37,28 +37,36 @@ based on the labels.

```yml
on:
pull_request_target: # for OSS with public contributions
pull_request:
pull_request_target: # for OSS with public contributions (forked PR)
pull_request:
# Useful for triaging code review, and generate compliance status check.
# Semantic release? Done.
# Make a file change in a mono repo. Tag the mono repo getting changed to generate better release!
issues:

issues:
# Useful for triaging error!
# '- [x] Is this a bug?' = 'bug' label!

issue_comment:
# To pickup comment body in pr or issue and generate a label.
# Imagine someone comment 'Me too, I get TimeoutException from ...' in comment body.
# Generate a 'bug/timeout' label for better triaging!

permissions:
# Setting up permissions in the workflow to limit the scope of what it can do. Optional!
contents: read
issues: write
pull-requests: write
statuses: write
checks: write

jobs:
labeler:
name: Labeler
runs-on: ubuntu-latest
steps:
# follows semantic versioning. Lock to different version: v1, v1.5, v1.5.0 or use a commit hash.
- uses: fuxingloh/multi-labeler@v1
- uses: fuxingloh/multi-labeler@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}} # optional, default to '${{ github.token }}'
config-path: .github/labeler.yml # optional, default to '.github/labeler.yml'
Expand Down Expand Up @@ -284,6 +292,8 @@ file to the repository.

## Matchers

> RegEx matcher requires backslash '\' to be double slashed '\\'. Hence, to match brackets '()' you need a regex of '\\(\\)'. See https://github.com/fuxingloh/multi-labeler/issues/103

### PR/Issue Title: RegEx

```yml
Expand All @@ -307,7 +317,7 @@ labels:
body: "(\\n|.)*- \\[x\\] bug(\\n|.)*"
```

### PR/Issue Comment: Regex
### PR/Issue Comment: RegEx

```yml
version: v1
Expand Down Expand Up @@ -474,11 +484,10 @@ checks:

> There are so many labeler why create another? 😧

1. I want a lightweight labeler that is written in TypeScript so that it don't have to build a docker image everytime it
runs.
1. I want a lightweight labeler that is written in TypeScript so that it don't have to build a docker image everytime it runs.
2. I want a simple match first append based multi-labeler without it being a turing complete solution.
3. I want to write my rules with `.github/labeler.yml` for a single source of label truth.
4. I don't want it to do anything else, labels only.
1. Assume you are using GitHub branch protection (labels only).
2. I want to run this in PR triage before everything else (labels only).
3. Chain this action with another action; this should just be for (labels only).
1. Assume you are using GitHub branch protection (labels only).
2. I want to run this in PR triage before everything else (labels only).
3. Chain this action with another action; this should just be for (labels only).
102 changes: 84 additions & 18 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading