move-stale-issues
Advanced tools
Comparing version 2.0.5 to 3.0.0
@@ -31,3 +31,3 @@ const github = require('@actions/github'); | ||
async function runAction(config, context) { | ||
async function runAction(owner, repo, config) { | ||
const { | ||
@@ -46,6 +46,5 @@ token, | ||
logger.info(`\texemptAllAssignees: ${exemptAllAssignees}`); | ||
logger.info(`\trepo owner: ${context.owner}`); | ||
logger.info(`\trepo: ${context.repo}`); | ||
logger.info(`\trepo owner: ${owner}`); | ||
logger.info(`\trepo: ${repo}`); | ||
const { repo, owner } = context; | ||
const octokit = github.getOctokit(token); | ||
@@ -52,0 +51,0 @@ |
@@ -58,3 +58,3 @@ const { getDaysDiff, runAction } = require('./move-stale-issues'); | ||
await runAction({ | ||
await runAction(owner, repo, { | ||
token, | ||
@@ -64,3 +64,3 @@ fromMilestone, | ||
daysBeforeStale: 0 | ||
}, { repo, owner }); | ||
}); | ||
@@ -146,3 +146,3 @@ const { data: issuesInTarget } = await octokit.rest.issues.listForRepo({ | ||
await runAction({ | ||
await runAction(owner, repo, { | ||
token, | ||
@@ -153,3 +153,3 @@ fromMilestone, | ||
exemptAllAssignees: true | ||
}, { repo, owner }); | ||
}); | ||
@@ -156,0 +156,0 @@ const { data: issuesInTarget } = await octokit.rest.issues.listForRepo({ |
{ | ||
"name": "move-stale-issues", | ||
"version": "2.0.5", | ||
"version": "3.0.0", | ||
"description": "Automatically move issues to a milestone", | ||
"main": "index.js", | ||
"main": "move-stale-issues.js", | ||
"scripts": { | ||
"test": "./node_modules/mocha/bin/mocha *.test.js --no-timeout", | ||
"lint": "DEBUG=eslint:cli-engine ./node_modules/eslint/bin/eslint.js index.js move-stale-issues.test.js move-stale-issues.js", | ||
"lint": "DEBUG=eslint:cli-engine ./node_modules/eslint/bin/eslint.js github-action.js move-stale-issues.test.js move-stale-issues.js", | ||
"build": "./node_modules/webpack/bin/webpack.js ." | ||
@@ -10,0 +10,0 @@ }, |
# Move Stale Issues | ||
[![sheriff](https://github.com/Deividy/move-stale-issues/actions/workflows/sheriff.yml/badge.svg)](https://github.com/Deividy/move-stale-issues/actions/workflows/sheriff.yml) | ||
[![NPM](https://nodei.co/npm/move-stale-issues.png?mini=true)](https://www.npmjs.com/package/move-stale-issues) | ||
This actions moves stales issues `from-milestone` to `target-milestone`. | ||
@@ -23,2 +25,24 @@ | ||
## Using with Node.js | ||
You can also use this action in your node.js app: | ||
```shell | ||
npm install move-stale-issues | ||
``` | ||
```javascript | ||
const { runAction } = require('move-stale-issues'); | ||
(async () => { | ||
await runAction('my-repo', 'repo-owner', { | ||
token: 'PAT', | ||
fromMilestone: 'From name', | ||
targetMilestone: 'Target name', | ||
daysBeforeStale: 30 | ||
}); | ||
``` | ||
--- | ||
## Workflow example | ||
@@ -36,3 +60,3 @@ ```yml | ||
steps: | ||
- uses: Deividy/move-stale-issues@v2.5 | ||
- uses: Deividy/move-stale-issues@v3 | ||
with: | ||
@@ -39,0 +63,0 @@ repo-token: ${{ secrets.GITHUB_TOKEN }} |
@@ -0,5 +1,6 @@ | ||
const TerserPlugin = require('terser-webpack-plugin'); | ||
const path = require('path'); | ||
module.exports = { | ||
entry: './index.js', | ||
entry: './github-action.js', | ||
mode: 'production', | ||
@@ -9,6 +10,9 @@ target: 'node', | ||
output: { | ||
filename: 'move-stale-issues.js', | ||
filename: 'github-action.js', | ||
path: path.resolve(__dirname, 'dist') | ||
} | ||
}, | ||
optimization: { | ||
minimizer: [ new TerserPlugin({ extractComments: false }) ], | ||
}, | ||
}; | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 8 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
0
100
402
66
33
422795
11