Open polarathene opened 2 years ago
Is there a reason for limiting the results to 1
as the goal of this action is to always return the 'last one', the limit must be 1
I like the match on title one
Feel free to submit a PR to implement that (as a another optional filter)
I'd use javascript generators so we can have a paginated iteration on all the issues
as the goal of this action is to always return the 'last one', the limit must be 1
You can just take the first element? (unless performing additional filtering like this FR would involve)
I like the match on title one
Body is also nice. If it wasn't clear you can have a comment such as this:
<!-- last-issue-action-metadata: id=workflow-run-key-with-id-num-42 priority=high -->
I have two examples below, where that id
value could be something like:
docs-pullrequest-${{ github.event.pull_request.number }}
${{ github.event.workflow_run.head_sha }}
Rather specific values, that don't really belong in an issue title or label, but can be useful metadata to match on.
With the <!-- -->
comment syntax, the content does not visually appear in the body text (only if you edit the body will you see it in markdown view).
Feel free to submit a PR to implement that (as a another optional filter)
I'd use javascript generators so we can have a paginated iteration on all the issues
I presently don't need this right now, but if I do at a later point I'll give it a shot :+1:
For now might be worth leaving the issue open to see if any other users want to express interest in the feature request?
You can just take the first element?
Right. As of now, there's no reason to fetch more because the filtering part is done by GitHub thus the first one will always be the right one that the action will return. Then we can improve the performance a bit by not fetching the others
I don't need those feature thus I won't implement that soon because that will require us to implement the filtering part (in case of title or body matching) by ourselves. Leaving this open so people could give it a shot
Presently from what I understand, this action works by:
issue_number
,is_closed
).Is there a reason for limiting the results to 1 (_from the default 30)?
With more results, the action could be used with a common label to get the
issue_number
for various automated issues. Doing a regex match on the title (eg: a prefix or suffix identifier), or body content (hidden content via comment is possible, great for storing metadata like an ID) would help better filter automated issues?No immediate need for this additional filtering. Labels can mostly be used for the same thing, it's just polluting the label selection UI for issues/PRs with manual triage with labels. The more automated labels added, the more noise added there.
Using labels + state filters and sorting by last updated is still great to ensure a match, I'm just concerned about scaling.