Compare commits

..

6 Commits

Author SHA1 Message Date
Ross Brodbeck
7a47124766 Default un-stale to true in new version 2020-05-11 10:34:40 -04:00
Ross Brodbeck
299593dff1 Add vscode debug settings 2020-05-11 10:30:00 -04:00
Ross Brodbeck
379e98cf36 Add a test for un-staling 2020-05-11 10:29:41 -04:00
Ross Brodbeck
51cc4676ff Add debugging, update tests and fix logic. 2020-05-11 09:44:50 -04:00
Ross Brodbeck
5a67f409c9 Fix up tests a bit to make this runnable (tests failing though) 2020-05-02 06:29:17 -04:00
Ross Brodbeck
cd198e6d88 First pass at ignorning issues with comments and allowing removal of the stale label 2020-05-02 06:04:09 -04:00
4 changed files with 20 additions and 18 deletions

View File

@@ -34,7 +34,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v1.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale'
@@ -52,7 +52,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v1.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'
@@ -71,11 +71,11 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v1.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-pr-message: 'Stale issue message'
stale-issue-label: 'no-issue-activity'
exempt-issue-labels: 'awaiting-approval,work-in-progress'
stale-pr-label: 'no-pr-activity'
@@ -84,4 +84,4 @@ jobs:
### Debugging
To see debug output from this action, you must set the secret `ACTIONS_STEP_DEBUG` to `true` in your repository. You can run this action in debug only mode (no actions will be taken on your issues) by passing `debug-only` `true` as an argument to the action.
To see debug ouput from this action, you must set the secret `ACTIONS_STEP_DEBUG` to `true` in your repository. You can run this action in debug only mode (no actions will be taken on your issues) by passing `debug-only` `true` as an argument to the action.

6
package-lock.json generated
View File

@@ -55,9 +55,9 @@
}
},
"@actions/http-client": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.8.tgz",
"integrity": "sha512-G4JjJ6f9Hb3Zvejj+ewLLKLf99ZC+9v+yCxoYf9vSyH+WkzPLB2LuUtRMGNkooMqdugGBFStIKXOuvH1W+EctA==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.7.tgz",
"integrity": "sha512-PY3ys/XH5WMekkHyZhYSa/scYvlE5T/TV/T++vABHuY5ZRgtiBZkn2L2tV5Pv/xDCl59lSZb9WwRuWExDyAsSg==",
"requires": {
"tunnel": "0.0.6"
}

View File

@@ -26,7 +26,7 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.3",
"@actions/github": "^2.2.0",
"@actions/github": "^2.1.1",
"@octokit/rest": "^16.43.1",
"semver": "^6.1.1"
},

View File

@@ -2,7 +2,7 @@ import * as core from '@actions/core';
import * as github from '@actions/github';
import {Octokit} from '@octokit/rest';
type OctoKitIssueList = Octokit.Response<Octokit.IssuesListForRepoResponse>;
type OcotoKitIssueList = Octokit.Response<Octokit.IssuesListForRepoResponse>;
export interface Issue {
title: string;
@@ -254,14 +254,16 @@ export class IssueProcessor {
// grab issues from github in baches of 100
private async getIssues(page: number): Promise<Issue[]> {
const issueResult: OctoKitIssueList = await this.client.issues.listForRepo({
owner: github.context.repo.owner,
repo: github.context.repo.repo,
state: 'open',
labels: this.options.onlyLabels,
per_page: 100,
page
});
const issueResult: OcotoKitIssueList = await this.client.issues.listForRepo(
{
owner: github.context.repo.owner,
repo: github.context.repo.repo,
state: 'open',
labels: this.options.onlyLabels,
per_page: 100,
page
}
);
return issueResult.data;
}