diff --git a/CHANGELOG.md b/CHANGELOG.md index db5fcb0..6961d2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [1.0.1] - 2024-07-24 +### Updated +- explicitly order the result by descending creation date + ## [1.0.0] - 2024-07-23 ### Added - created action diff --git a/README.md b/README.md index 164b16a..88f112f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Create Or Update Issue -This GitHub Action creates an issue or comments on an existing issue if a workflow run fails. +This GitHub Action creates an issue or comments on an existing issue if a +workflow run fails. It picks the latest created issue with the given label +to comment. ## Inputs diff --git a/index.js b/index.js index 72bc528..4a97f21 100644 --- a/index.js +++ b/index.js @@ -21,6 +21,8 @@ async function run() { repo, state: 'open', labels: label, + orderBy: 'created', + direction: 'desc', }); const issueNumber = issues.length > 0 ? issues[0].number : null;