From 013a5aace87420564c9128f63ede82627441e23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 15 Jan 2021 15:16:10 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=91=B7=20Replace=20GitIssueBot=20full?= =?UTF-8?q?y=20with=20GH=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue cleanup left to dry-run for now --- .github/issue-validation.yml | 62 ++++++++++++++++++++++++++ .github/workflows/issue_automation.yml | 8 ++++ .github/workflows/issue_cleanup.yml | 26 +++++++++++ .github/workflows/pr_automation.yml | 2 +- 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 .github/issue-validation.yml create mode 100644 .github/workflows/issue_cleanup.yml diff --git a/.github/issue-validation.yml b/.github/issue-validation.yml new file mode 100644 index 000000000..763ca73a2 --- /dev/null +++ b/.github/issue-validation.yml @@ -0,0 +1,62 @@ +approve_label: approved +problem_label: incomplete +ignored_labels: + - approved + - bug + - request + - improvement + - brainstorming + - task + - rc feedback + - awaiting information + - not octoprint + - done +ignored_authors: + - "@OctoPrint" + - "sentry-io" + - "FormerLurker" + - "bzed" + +validation_comment: > + Hi @@@AUTHOR@@, + + + it looks like there is some **information missing** from your bug report that will + be needed in order to solve the problem. Read the [Contribution Guidelines](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md) + which will provide you with a template to *fully fill out* here so that your bug report + is ready to be investigated (I promise I'll go away then too!). + + + If you did not intend to report a bug but wanted to **request a feature or brain + storm** about some kind of development, please take special note of the title format + to use as described in the [Contribution Guidelines](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md). + + + **Please do not abuse the bug tracker as a support forum** - that can be found at + [community.octoprint.org](https://community.octoprint.org). Go there for any kind + of issues with network connectivity, webcam functionality, printer detection or + any other kind of such support requests or general questions. + + + Also **make sure you are at the right place** - this is the bug tracker of the official + version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third + party OctoPrint plugins or unofficial versions. Make sure too that you have **read + through the [Frequently Asked Questions](http://faq.octoprint.org)** and searched + the [**existing tickets**](https://github.com/OctoPrint/OctoPrint/issues) + for your problem - try multiple search terms please. + + + I'm marking this one now as needing some more information. Please understand that + if you do not provide that information within the next two weeks + I'll close this ticket so it doesn't clutter the bug tracker. This is nothing + personal, it's needed to keep this project manageable. Please just be considerate + and help the maintainers solve this problem + quickly by following the guidelines linked above. Remember, the less time the devs + have to spend running after information on tickets, the more time they have to actually + solve problems and add awesome new features. Thank you! + + + *I'm just a bot ๐Ÿค–, not a human being, so don't expect any replies + from me :) Your ticket is read by humans too, I'm just not one of them.* + +keyphrase: I have read the FAQ diff --git a/.github/workflows/issue_automation.yml b/.github/workflows/issue_automation.yml index f3024d73f..d3fbdf185 100644 --- a/.github/workflows/issue_automation.yml +++ b/.github/workflows/issue_automation.yml @@ -62,3 +62,11 @@ jobs: labels: labels }) } + + validate: + runs-on: ubuntu-latest + needs: label + steps: + - uses: OctoPrint/actions/issue-validation@main + with: + - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/issue_cleanup.yml b/.github/workflows/issue_cleanup.yml new file mode 100644 index 000000000..679b4ac92 --- /dev/null +++ b/.github/workflows/issue_cleanup.yml @@ -0,0 +1,26 @@ +name: "Issue cleanup" +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - id: date + run: | + echo "::set-output name=CUTOFF::`date --date='14 days ago' +'%Y-%m-%d'`" + - uses: OctoPrint/actions/close-by-query@main + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + query: "is:issue is:open label:incomplete created:<${{ steps.date.outputs.CUTOFF }}" + dry-run: true + comment: > + Since apparently some of the required information is still missing, this will be + closed now, sorry. Feel free to request a reopen of this or create a new issue + once you can provide **all** + [required information](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md#how-to-file-a-bug-report). + + + This is nothing personal. Thank you for your collaboration. diff --git a/.github/workflows/pr_automation.yml b/.github/workflows/pr_automation.yml index e770708a0..692db55bb 100644 --- a/.github/workflows/pr_automation.yml +++ b/.github/workflows/pr_automation.yml @@ -17,4 +17,4 @@ jobs: steps: - uses: OctoPrint/actions/pr-validation@main with: - github-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} From 29acb4cacc37ab199915bbfbb34995e19ae0c8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 15 Jan 2021 15:20:59 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=91=B7=20Fix=20workflow=20syntax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issue_automation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_automation.yml b/.github/workflows/issue_automation.yml index d3fbdf185..0dd06a4ed 100644 --- a/.github/workflows/issue_automation.yml +++ b/.github/workflows/issue_automation.yml @@ -69,4 +69,4 @@ jobs: steps: - uses: OctoPrint/actions/issue-validation@main with: - - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} From 19f774429fbb9ba88636d66ce6efb50dce97efb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 15 Jan 2021 15:36:24 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=91=B7=20Limit=20issue=20validation?= =?UTF-8?q?=20to=20opened=20&=20edited?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also merge validations into one job instead of two. --- .github/workflows/issue_automation.yml | 7 ++----- .github/workflows/pr_automation.yml | 6 +----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/issue_automation.yml b/.github/workflows/issue_automation.yml index 0dd06a4ed..0ba8b6f44 100644 --- a/.github/workflows/issue_automation.yml +++ b/.github/workflows/issue_automation.yml @@ -4,7 +4,7 @@ on: types: [opened, edited, closed, reopened] jobs: - label: + issue-automation: runs-on: ubuntu-latest steps: - uses: actions/github-script@v2 @@ -63,10 +63,7 @@ jobs: }) } - validate: - runs-on: ubuntu-latest - needs: label - steps: - uses: OctoPrint/actions/issue-validation@main + if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'edited') with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr_automation.yml b/.github/workflows/pr_automation.yml index 692db55bb..659733438 100644 --- a/.github/workflows/pr_automation.yml +++ b/.github/workflows/pr_automation.yml @@ -4,17 +4,13 @@ on: types: ["opened", "synchronize", "reopened", "edited", "labeled", "unlabeled"] jobs: - label: + pr-automation: runs-on: ubuntu-latest steps: - uses: actions/labeler@v3 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" - validate: - runs-on: ubuntu-latest - needs: label - steps: - uses: OctoPrint/actions/pr-validation@main with: repo-token: ${{ secrets.GITHUB_TOKEN }} From e23d3b88f9c5e7157cc90ba354fcd16a627366eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 15 Jan 2021 15:41:41 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=91=B7=20Merge=20lock=20&=20cleanup?= =?UTF-8?q?=20into=20one=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/{issue_cleanup.yml => cleanup.yml} | 15 +++++++++++++-- .github/workflows/lock.yml | 16 ---------------- 2 files changed, 13 insertions(+), 18 deletions(-) rename .github/workflows/{issue_cleanup.yml => cleanup.yml} (71%) delete mode 100644 .github/workflows/lock.yml diff --git a/.github/workflows/issue_cleanup.yml b/.github/workflows/cleanup.yml similarity index 71% rename from .github/workflows/issue_cleanup.yml rename to .github/workflows/cleanup.yml index 679b4ac92..80ff4f957 100644 --- a/.github/workflows/issue_cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -1,11 +1,23 @@ -name: "Issue cleanup" +name: "Cleanup issues & PRs" + on: schedule: - cron: "0 0 * * *" workflow_dispatch: jobs: + lock: + name: ๐Ÿ”’ Lock issues & PRs closed over a year + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v2 + with: + github-token: ${{ github.token }} + issue-lock-comment: "" + pr-lock-comment: "" + cleanup: + name: ๐Ÿงน Close issues marked as incomplete & older than 14 days runs-on: ubuntu-latest steps: - id: date @@ -15,7 +27,6 @@ jobs: with: repo-token: "${{ secrets.GITHUB_TOKEN }}" query: "is:issue is:open label:incomplete created:<${{ steps.date.outputs.CUTOFF }}" - dry-run: true comment: > Since apparently some of the required information is still missing, this will be closed now, sorry. Feel free to request a reopen of this or create a new issue diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml deleted file mode 100644 index b753d3fc0..000000000 --- a/.github/workflows/lock.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: "Lock outdated issues & PRs" - -on: - schedule: - - cron: "0 0 * * *" - -jobs: - lock: - runs-on: ubuntu-latest - steps: - - name: ๐Ÿ”’ Lock issues & PRs closed over a year - uses: dessant/lock-threads@v2 - with: - github-token: ${{ github.token }} - issue-lock-comment: "" - pr-lock-comment: ""