Find Last Issue
ActionsGitHub Action to find and export the number of last updated issue whithin some repository that has given labels
v1.1.0
By micalevisk
GitHub Action to find and output the number of last updated issue that has given labels and state.
Name | Description | Default |
---|---|---|
* labels |
Comma or newline-separated list of labels that the issue must have | |
state |
Issue state. Can be one of the following strings:
|
"open" |
Name | Description |
---|---|
issue_number |
The number of the issue found, if any. |
has_found |
Response status. Will be true if some issue was found. false otherwise. |
Name | Description | Default |
---|---|---|
GITHUB_TOKEN |
GITHUB_TOKEN or a repo scoped Personal Access Token |
GITHUB_TOKEN secret created by GitHub |
You can use this action along with create-issue-from-file action, like:
# ...
- name: Find the last open report issue
id: last_issue
uses: micalevisk/find-last-issue@v1
with:
state: open
## The issue must have the following labels
labels: |
report
automated issue
env:
## Optional since it uses the `GITHUB_TOKEN` created by GitHub by default
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo ${{ steps.last_issue.outputs.issue_number }}
- name: Update last updated report issue
if: ${{ steps.last_issue.outputs.has_found == 'true' }}
uses: peter-evans/create-issue-from-file@v3
with:
title: Foo
content-filepath: README.md
issue-number: ${{ steps.last_issue.outputs.issue_number }}
labels: |
report
automated issue
Find Last Issue is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.