Files
stale/src/functions/get-sort-field.ts
suyashgaonkar 128b2c81d0 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>
2025-07-10 22:30:19 -05:00

9 lines
242 B
TypeScript

type sortOptions = 'created' | 'updated' | 'comments';
export function getSortField(sortOption: sortOptions): sortOptions {
return sortOption === 'updated'
? 'updated'
: sortOption === 'comments'
? 'comments'
: 'created';
}