Skip to content

Commit

Permalink
chore: rename CliCop to Kanar #PLTM-233 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaszczuk authored Oct 11, 2024
1 parent 7252143 commit 5b7f792
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# CliCop
![CliCop logo](clicop.png)
# Kanar
![Kanar logo](kanar.png)


CliCop is an Github Actions action that enforces pinning ticket id reference in a PR.\
Kanar is an Github Actions action that enforces pinning ticket id reference in a PR.\
It will fail if there is no task id in PR title.\
It utilizes [DangerJS](https://danger.systems/js/) to perform the check.

## Inputs
github_token - Github authentification token.
jira_token - Jira authentification token.
jira_token_user - Email of Jira user the authentification token belongs to.

## Testing
The action conitains some unit tests. To run them:
Expand All @@ -19,7 +20,7 @@ npm test

## Example usage
```yaml
name: CliCop
name: Kanar

on:
pull_request:
Expand All @@ -35,11 +36,12 @@ permissions:
statuses: write

jobs:
clicop:
kanar:
runs-on: ubuntu-latest
steps:
- uses: RampNetwork/github-actions/[email protected]
- uses: RampNetwork/github-actions/kanar@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # this is passed automatically https://docs.github.com/en/actions/security-guides/automatic-token-authentication
jira_token: ${{ secrets.JIRA_TOKEN }}
jira_token_user: ${{ secrets.JIRA_TOKEN_USER }}
```
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CliCop
name: Kanar
description: "Run DangerJS to check if the PR is has a valid Jira ticket reference"

inputs:
Expand Down Expand Up @@ -29,4 +29,4 @@ runs:
JIRA_TOKEN: ${{ inputs.jira_token }}
JIRA_TOKEN_USER: ${{ inputs.jira_token_user }}
NODE_PATH: ${{ github.action_path }}
run: npx danger -i CliCop --dangerfile ${{ github.action_path }}/dangerfile.js ci
run: npx danger -i Kanar --dangerfile ${{ github.action_path }}/dangerfile.js ci
File renamed without changes
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "clicop",
"name": "kanar",
"version": "1.0.0",
"description": "Action that enforces pinning Jira ticket id reference in a PR using DangerJS",
"main": "dangerfile.js",
Expand Down

0 comments on commit 5b7f792

Please sign in to comment.