Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 26 commits into from
Apr 30, 2021
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c21e2f2
Merge pull request #1 from actions/main
C0ZEN Nov 22, 2020
c913fa4
Merge pull request #2 from actions/main
C0ZEN Jan 16, 2021
9cf9bf2
Merge pull request #3 from actions/main
C0ZEN Jan 16, 2021
f11f623
Merge pull request #4 from actions/main
C0ZEN Jan 16, 2021
0f1457a
Merge pull request #5 from actions/main
C0ZEN Jan 17, 2021
fef6333
Merge pull request #6 from actions/main
C0ZEN Jan 18, 2021
e1ba62c
Merge pull request #7 from actions/main
C0ZEN Jan 23, 2021
abab4a6
Merge pull request #8 from actions/main
C0ZEN Feb 9, 2021
920683c
Merge pull request #9 from actions/main
C0ZEN Feb 13, 2021
a98474b
Merge pull request #10 from actions/main
C0ZEN Feb 18, 2021
915ed27
Merge pull request #11 from actions/main
C0ZEN Mar 1, 2021
4b097b3
Merge pull request #12 from actions/main
C0ZEN Mar 1, 2021
5575ade
docs(only-labels): enhance the docs and fix duplicate (#341)
C0ZEN Mar 4, 2021
b806328
build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)
dependabot[bot] Mar 4, 2021
c6b2c30
build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)
dependabot[bot] Mar 4, 2021
5a8ec1e
Merge pull request #14 from actions/main
C0ZEN Mar 4, 2021
6c29691
test: add more coverage for the stale label behaviour (#352) (#15)
C0ZEN Mar 5, 2021
d485d43
test: add more coverage for the stale label behaviour (#352) (#17)
C0ZEN Mar 9, 2021
25621f6
test: add more coverage for the stale label behaviour (#352) (#18)
C0ZEN Mar 9, 2021
3ba579e
feat(remove-stale-when-updated): add 2 options for issues and prs
C0ZEN Mar 9, 2021
b90e830
chore(logs): add more logs to understand the process
C0ZEN Mar 9, 2021
b4e7069
chore(logs): highlights more logs and humanize a bit more
C0ZEN Mar 9, 2021
9329d67
Merge branch 'main' into feature/remove-stale-when-updated
C0ZEN Mar 9, 2021
6d3c045
chore(index): update it
C0ZEN Mar 9, 2021
f9eb4e8
Merge branch 'main' into feature/remove-stale-when-updated
C0ZEN Apr 28, 2021
0c3de42
refactor(checks): simplify if complexity
C0ZEN Apr 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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