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

Add an opened_since() selector #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
18 changes: 12 additions & 6 deletions post-processing/viewer/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ var issueFilters = {
or: {
args: ['filter', '...filter'],
h: 'union',
f: (...filters) => x => filters.some(filter => filter(x)),
f: (...filters) => x => filters.some(filter => filter(x)),
},

and: {
Expand All @@ -265,17 +265,23 @@ var issueFilters = {
f: a => issue => !a(issue),
},

closed_since: {
opened_since: {
args: ['date'],
h: 'issues closed since the date and time',
f: since => issue => date(issue.closedAt) >= since,
h: 'opened closed since the date and time',
f: since => issue => date(issue.createdAt) >= since,
},

updated_since: {
args: ['date'],
h: 'issues updated since the date and time',
h: 'updated since the date and time',
f: since => issue => date(issue.updatedAt) >= since,
}
},

closed_since: {
args: ['date'],
h: 'closed since the date and time',
f: since => issue => date(issue.closedAt) >= since,
},
};

class Parser {
Expand Down