Code Monkey home page Code Monkey logo

auto-close-issues's People

Contributors

lucasbento avatar radwolfie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

auto-close-issues's Issues

Warning: Unexpected input(s)

Environment

ubuntu-latest of GitHub Actions

Upgrading version

not upgrading, using v1.0.2

Description

issue not closed and this warning appears

Warning: Unexpected input(s) 'issue-close-message', 'closed-issues-label', valid inputs are ['github-token']

Reproducible demo

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 ?

Action translate config.yml file into markdown

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

Close an Issue for a particular Check

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."

A warning message always appears

Environment

ubuntu-latest of GitHub Actions

Upgrading version

v1.0.2

Description

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']

Screenshots

Screen Shot 2020-11-17 at 4 24 52 PM

Reproducible demo

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

Request: Only match issues with a label

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.

Action completes successfully but issue is not closed

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

Close issues that don't follow the template body?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.