Create a Jira issue for removing unused dependency in package.json
Note: this action requires Jira Login Action
Example workflow which is triggered on schedule:
name: "DepCheck"
on:
schedule:
- cron: '0 9 28 * *'
jobs:
dep-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
node-version: 14.x
- name: Login
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BOT_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_BOT_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_BOT_TOKEN }}
- name: Install depcheck
run: npm i -g depcheck
- name: Run depcheck on client
id: step_client
run: echo "result=$(depcheck --skip-missing=true | tr '\n' ' ')" >> $GITHUB_OUTPUT
- name: Create Jira Task client
id: step_task_client
uses: optimaxdev/action-dependency_check@master
with:
project: GUSA
issuetype: Improvement
baseUrl: ${{ secrets.JIRA_BOT_URL }}
email: ${{ secrets.JIRA_BOT_EMAIL }}
token: ${{ secrets.JIRA_BOT_TOKEN }}
depcheck: ${{ steps.step_client.outputs.result }}
comment: ON CLIENT
ignores: '@actions/core, depcheck' # example
GITHUB_TOKEN
- GitHub secret token is used to retrieve diffs
project
- Key of the projectissuetype
- Type of the issue to be created. Example: 'Task'baseUrl
- Base URL of you jira boardemail
- Jira account emailtoken
- Jira account tokendepcheck
- The JSON object this mission dependencyignores
- The list of package which ignore in taskcomment
- Extend jira task description
issue
: key of newly created issue
When change this repository you should install vercel
npm i -g @vercel/ncc
Run command after changes and precommit
ncc build index.js -o dist