mirror of
https://github.com/actions/stale.git
synced 2025-12-11 20:47:10 +00:00
Introducing sort-by option (#1254)
* sort-issues-by introduced * action.yml updated * pushing the build code * Update action.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update README.md for the new parameter (sort-issues-by) * minor text format changes in README.md * final draft of sort-issues-by * Update src/interfaces/issues-processor-options.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/classes/issues-processor.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactored the code * test * test * final changes * update in README.md * Documentation update * updated sort-issues-by to sort-by * minor changes * dist fixes --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -29,6 +29,7 @@ import {retry} from '@octokit/plugin-retry';
|
||||
import {IState} from '../interfaces/state/state';
|
||||
import {IRateLimit} from '../interfaces/rate-limit';
|
||||
import {RateLimit} from './rate-limit';
|
||||
import {getSortField} from '../functions/get-sort-field';
|
||||
|
||||
/***
|
||||
* Handle processing of issues for staleness/closure.
|
||||
@@ -571,6 +572,7 @@ export class IssuesProcessor {
|
||||
state: 'open',
|
||||
per_page: 100,
|
||||
direction: this.options.ascending ? 'asc' : 'desc',
|
||||
sort: getSortField(this.options.sortBy),
|
||||
page
|
||||
});
|
||||
this.statistics?.incrementFetchedItemsCount(issueResult.data.length);
|
||||
|
||||
Reference in New Issue
Block a user