Add a label when closing an issue.
- [X ] I've read the guidelines for Contributing to Roots Projects
- [ X] This request isn't a duplicate of an existing request
- [X ] This is not a personal support request that should be posted on the Roots Discourse community
Summary
Once issue-closer-action has determined that an issue should be closed, it would be helpful if it also had an option to also add a label to the issue.
Motivation
It would improve sorting through closed issues at a glance, particularly in higher-trafficked repos.
Additional context
None needed.
Good idea 👍 do you want to try contributing this?
2 years have passed, and here I am thinking the same thing!
I'd be happy to take a look, except I am pretty new to this and am just exploring GitHub Actions. I'm not familiar with how I can test it on my own, so feedback is greatly appreciated! @swalkinshaw @hjdhjd
So far, combining my intuition and findings from resources below:
- workflow Annotations (logs)
Unexpected input(s) 'close-issue-reason', 'close-issue-label', valid inputs are ['issue-close-message', 'issue-pattern', 'pr-close-message', 'pr-pattern', 'repo-token'] -
close-issue-labelfrom List of input options of GitHub Action's Close Stale Issues workflowactions/[email protected] - Template starter-workflow from Github Actions
manual.yml
I'm guessing I'd go to action.yml, under inputs, add another optional input close-issue-label with properties description and required, like so:
close-issue-label:
description: Label to apply on closed issues
required: false
Inside YOUR_WORKFLOW.yml, add permissions to follow runs-on:
runs-on: ubuntu-latest # existing line
permissions:
issues: write
steps: # existing line
Thanks 🙏🏻