Skip to content

Commit

Permalink
feat(remove-stale-when-updated): add 2 options for issues and prs (ac…
Browse files Browse the repository at this point in the history
…tions#383)

* docs(only-labels): enhance the docs and fix duplicate (actions#341)

* docs(only-labels): remove duplicated option and improve descriptions

a bad rebase happend

* docs(readme): use a multi-line array and remove the optional column

the option column was not helpful since each value is optional
the multi-line array will allow to have a better UI in small devices and basically in GitHub too due to the max-width

* style(readme): break line for the statistics

* docs(readme): add a better description for the ascending option

* docs(action): add missing punctuation

* build(deps-dev): bump @typescript-eslint/eslint-plugin (actions#342)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.2 to 4.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (actions#350)

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.3.0 to 18.3.2.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](octokit/rest.js@v18.3.0...v18.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (actions#352) (#15)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (actions#352) (#17)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: add more coverage for the stale label behaviour (actions#352) (#18)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(remove-stale-when-updated): add 2 options for issues and prs

closes actions#377
also I closed the stale process once the stale label is removed since the following process is regarding the closing and it should simply not occur if no longer stale

* chore(logs): add more logs to understand the process

* chore(logs): highlights more logs and humanize a bit more

* chore(index): update it

* refactor(checks): simplify if complexity

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
C0ZEN and dependabot[bot] committed Apr 30, 2021
1 parent 043fbbd commit 440fb17
Show file tree
Hide file tree
Showing 12 changed files with 767 additions and 81 deletions.
94 changes: 48 additions & 46 deletions README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions __tests__/constants/default-processor-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({
operationsPerRun: 100,
debugOnly: true,
removeStaleWhenUpdated: false,
removeIssueStaleWhenUpdated: undefined,
removePrStaleWhenUpdated: undefined,
ascending: false,
skipStaleIssueMessage: false,
skipStalePrMessage: false,
Expand Down
6 changes: 2 additions & 4 deletions __tests__/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1220,8 +1220,7 @@ test('stale issues should not be closed if days is set to -1', async () => {
});

test('stale label should be removed if a comment was added to a stale issue', async () => {
const opts = {...DefaultProcessorOptions};
opts.removeStaleWhenUpdated = true;
const opts = {...DefaultProcessorOptions, removeStaleWhenUpdated: true};
const TestIssueList: Issue[] = [
generateIssue(
opts,
Expand Down Expand Up @@ -1257,8 +1256,7 @@ test('stale label should be removed if a comment was added to a stale issue', as
});

test('stale label should not be removed if a comment was added by the bot (and the issue should be closed)', async () => {
const opts = {...DefaultProcessorOptions};
opts.removeStaleWhenUpdated = true;
const opts = {...DefaultProcessorOptions, removeStaleWhenUpdated: true};
github.context.actor = 'abot';
const TestIssueList: Issue[] = [
generateIssue(
Expand Down
Loading

0 comments on commit 440fb17

Please sign in to comment.