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

V1.0.5 #1

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ DarkSide:
Create a workflow (eg: `.github/workflows/team-labeler.yml` see [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)) to utilize the labeler action.
This action only needs the GITHUB_TOKEN secret as it interacts with the GitHub API to modify labels. The action can be used as such:

### Self repo labeler usage
```yaml
on: pull_request
name: team-label
Expand All @@ -47,4 +48,25 @@ jobs:
- uses: JulienKode/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: '.github/teams.yml'
```

### Remote repo labeler usage
```yaml
on: pull_request
name: team-label
jobs:
team-labeler:
runs-on: ubuntu-latest
steps:
- uses: JulienKode/[email protected]
with:
repo-token: "${{ secrets.SECRET_PAT }}"
configuration-path: '.github/teams.yml'
source: 'remote'
owner: 'my-org'
repo: 'repository-name'
reft: 'my-branch'
```
> - `${{ secrets.GITHUB_TOKEN }}` is scoped to the current repository, so if you want to checkout a different repository that is private you will need to provide your own [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).

14 changes: 14 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ inputs:
description: 'The path for the label configurations'
required: false
default: '.github/teams.yml'
source:
required: false
description: remote or local repository
default: 'local'
repo:
required: false
description: if source is remote, share the repository name
owner:
required: false
description: if source is remote, share owner of the repo
ref:
required: false
description: if source is remot, share the repository ref
default: 'main'
runs:
using: 'node12'
main: 'dist/index.js'
Expand Down
Loading