lucasbento / auto-close-issues Goto Github PK
View Code? Open in Web Editor NEWAutomatically close issues that don't follow the issue template.
Automatically close issues that don't follow the issue template.
Config file: https://github.com/WeakAuras/WeakAuras2/blob/master/.github/ISSUE_TEMPLATE/config.yml
Using both, 1.0.2 from this repo as well as @ergo720's fork and its version 1.0.4 don't have any results for me.
As a test, this is an issue that ignores every template, yet it was not closed https://github.com/WeakAuras/WeakAuras2/issues/2467
Hello 👋
Would it be possible to automatically close issues if some check-boxes are not checked by the user? That would be a killer feature for my usecase :)
Example: https://github.com/martpie/next-transpile-modules/blob/master/.github/ISSUE_TEMPLATE/bug_report.md
ubuntu-latest of GitHub Actions
not upgrading, using v1.0.2
issue not closed and this warning appears
Warning: Unexpected input(s) 'issue-close-message', 'closed-issues-label', valid inputs are ['github-token']
Workflow: https://github.com/MrGreensWorkshop/issue_closer_test/blob/main/.github/workflows/main.yml
issue: https://github.com/MrGreensWorkshop/issue_closer_test/issues/2
log: https://github.com/MrGreensWorkshop/issue_closer_test/actions/runs/2142509069
related with #8 ?
Github Actions
Latest
Does this bot works with the new .yml form template ?
=> https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
N/A
While we were trying to figure out how come your action isn't working for us. I thought of several possibilities cause of the issue. Turns out none of them were the cause until I have create a separate repository.
From a clone repository of this action repository, is working fine. Using our workflow file and template in the clone repository are also working fine as well. I have narrow down to your action's bug. Your action is reading config.yml
file as markdown which broke the process. config.yml
file is reserved for github's additional buttons to be render usage.
See RadWolfie#2 for reproduce issue.
Cheers
Right now, only issues which do not match the template are being closed. Could you add functionality to "Close the issue" for a particular condition the user needs?
Example Scenario:
If my issue has a particular label, it has to close automatically.
my workflow would be like this:
on:
issues:
types: [opened, labeled]
jobs:
auto_close_issues:
if: github.event.label.name == 'typo'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Automatically close typo issues
uses: lucasbento/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-close-message: "@${issue.user.login}: Hello! :wave:\n\nThis issue is being automatically closed, Please open a PR with a relevant fix."
ubuntu-latest
of GitHub Actions
v1.0.2
The automatic closing of the issue works normally, but the following warning message always appears in the log:
Warning: Unexpected input(s) 'issue-close-message', 'closed-issues-label', valid inputs are ['github-token']
The workflow file: https://github.com/peace3000/temp/actions/runs/367679781/workflow
The testing issue: https://github.com/peace3000/temp/issues/1
The log of GitHub Action: https://github.com/peace3000/temp/runs/1410983467?check_suite_focus=true
I'd like to make sure that the template is only checked for issues made from that template. We disable blank issues from being made already. However, when converting items from projects to issues, or when using line references to create new issues, the template isn't there and so it will always auto-close.
Anyway, it might be nice to let people "require" certain tags that they specify in the template, so that some issues that are intended to can slip by just fine.
Hi,
first of all, thanks for this project. I was trying to use it since i am trying to get familiar wit it and Github actions.
Seems everything worked but the result is not the expected like the title says. The logs shows me this:
2020-03-27T16:24:48.7041862Z ##[section]Starting: Request a runner to run this job
2020-03-27T16:24:48.8900387Z Requesting a hosted runner in current repository's account/organization with labels: 'ubuntu-latest', require runner match: True
2020-03-27T16:24:48.9791717Z Labels matched hosted runners has been found, waiting for one of them get assigned for this job.
2020-03-27T16:24:49.0479289Z ##[section]Finishing: Request a runner to run this job
2020-03-27T16:24:56.7014831Z Current runner version: '2.165.2'
2020-03-27T16:24:56.7015947Z Prepare workflow directory
2020-03-27T16:24:56.7201290Z Prepare all required actions
2020-03-27T16:24:56.7211954Z Download action repository 'lucasbento/[email protected]'
2020-03-27T16:24:58.0374262Z ##[group]Run lucasbento/[email protected]
2020-03-27T16:24:58.0374671Z with:
2020-03-27T16:24:58.0375143Z github-token: ***
2020-03-27T16:24:58.0375431Z issue-close-message: Hello @davidmpaz! :wave:
This issue is being automatically closed because it does not follow the issue template.
2020-03-27T16:24:58.0375721Z closed-issues-label: � Not following issue template
2020-03-27T16:24:58.0375963Z ##[endgroup]
2020-03-27T16:24:58.4537195Z (node:2514) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '.github/ISSUE_TEMPLATE'
2020-03-27T16:24:58.4537543Z at Object.readdirSync (fs.js:854:3)
2020-03-27T16:24:58.4538034Z at /home/runner/work/_actions/lucasbento/auto-close-issues/v1.0.2/dist/index.js:10051:29
2020-03-27T16:24:58.4538609Z at Object.676 (/home/runner/work/_actions/lucasbento/auto-close-issues/v1.0.2/dist/index.js:10128:3)
2020-03-27T16:24:58.4539144Z at __webpack_require__ (/home/runner/work/_actions/lucasbento/auto-close-issues/v1.0.2/dist/index.js:22:30)
2020-03-27T16:24:58.4539634Z at startup (/home/runner/work/_actions/lucasbento/auto-close-issues/v1.0.2/dist/index.js:37:19)
2020-03-27T16:24:58.4540101Z at /home/runner/work/_actions/lucasbento/auto-close-issues/v1.0.2/dist/index.js:43:18
2020-03-27T16:24:58.4540612Z at Object.<anonymous> (/home/runner/work/_actions/lucasbento/auto-close-issues/v1.0.2/dist/index.js:46:10)
2020-03-27T16:24:58.4540885Z at Module._compile (internal/modules/cjs/loader.js:959:30)
2020-03-27T16:24:58.4541147Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
2020-03-27T16:24:58.4541407Z at Module.load (internal/modules/cjs/loader.js:815:32)
2020-03-27T16:24:58.4544762Z (node:2514) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
2020-03-27T16:24:58.4545900Z (node:2514) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2020-03-27T16:24:58.4571786Z Cleaning up orphan processes
Any idea about it?
Thanks in advance and best regards,
David
I was wondering if this action could be altered to close issues, which do not follow the actual body of the template.
Not everyone wants to have a pre-defined title for issues (like me) and some people may alter the title, but still follow the general template, so closing the issue for just altering the title would be quite rude.
If possible should the action be able to compare template with issue body.
The only issue I see so far would be to look for user-input (the comments they make) and perhaps for checklists being checked (- [x] text
)
For the text could the template itself perhaps contain a invisible placeholder using <!-- text -->
to tell it, where user-input would be.
Like:
> Please provide your info here
<!-- INPUT:START -->
<!-- INPUT:END -->
I'm really interested in using this action, but the aforementioned limitation makes it quite useless for my cases, so I hope there can be a future solution for this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.