From 2a7fd6877a5aa91716e21b5141b51dc17cbaaac4 Mon Sep 17 00:00:00 2001 From: Jacky Liang Date: Thu, 15 Aug 2024 15:35:59 -0400 Subject: [PATCH] Updated workflows --- .github/workflows/lock-inactive-issues.yml | 8 ++--- .github/workflows/sponsor-gated-support.yml | 39 +++++++++++++++++++++ 2 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/sponsor-gated-support.yml diff --git a/.github/workflows/lock-inactive-issues.yml b/.github/workflows/lock-inactive-issues.yml index 0edcad4..04c0a1b 100644 --- a/.github/workflows/lock-inactive-issues.yml +++ b/.github/workflows/lock-inactive-issues.yml @@ -4,7 +4,7 @@ run-name: "Running a scheduled task to lock inactive issues over 30 days" on: schedule: - - cron: "0 0 * * *" + - cron: "0 0 * * 0" permissions: issues: "write" @@ -16,7 +16,7 @@ jobs: - uses: "dessant/lock-threads@v5" with: github-token: "${{ secrets.GITHUB_TOKEN }}" - issue-comment: "Due to inactivity, this issue will be locked and marked as resolved. If you have any further questions or inquiries, please feel free to open a new [issue](https://github.com/mrjackyliang/homebridge-adt-pulse/issues/new/choose)." - issue-inactive-days: 30 + issue-comment: "Due to inactivity, this issue will be locked and marked as resolved. If you have any further questions or inquiries, please feel free to open a new issue." + issue-inactive-days: "30" issue-lock-reason: "resolved" - log-output: true + log-output: "true" diff --git a/.github/workflows/sponsor-gated-support.yml b/.github/workflows/sponsor-gated-support.yml new file mode 100644 index 0000000..46b7e75 --- /dev/null +++ b/.github/workflows/sponsor-gated-support.yml @@ -0,0 +1,39 @@ +name: "Sponsor Gated Support" + +run-name: "Running a task to analyze support issues" + +on: + issue_comment: + types: + - "created" + - "edited" + issues: + types: + - "opened" + - "closed" + +permissions: + issues: "write" + +jobs: + check-issues: + runs-on: "ubuntu-latest" + steps: + - name: "Checkout repository" + uses: "actions/checkout@v4" + - name: "Show current workflow directory" + run: "ls -la" + - name: "Check support issues" + uses: "mrjackyliang/sponsor-gated-support@1.0.1" + with: + GITHUB_PERSONAL_ACCESS_TOKEN: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" + GITHUB_WORKFLOW_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + ISSUE_LABELS: "${{ vars.ISSUE_LABELS }}" + ISSUE_LIMIT_COMMENTER: "${{ vars.ISSUE_LIMIT_COMMENTER }}" + ISSUE_LOCK_ON_CLOSE: "${{ vars.ISSUE_LOCK_ON_CLOSE }}" + ISSUE_MESSAGE_NOT_SPONSOR: "${{ vars.ISSUE_MESSAGE_NOT_SPONSOR }}" + ISSUE_MESSAGE_WELCOME: "${{ vars.ISSUE_MESSAGE_WELCOME }}" + IS_ORGANIZATION: "${{ vars.IS_ORGANIZATION }}" + SPONSOR_ACTIVE_ONLY: "${{ vars.SPONSOR_ACTIVE_ONLY }}" + SPONSOR_EXEMPT_FILE_LOCATION: "${{ vars.SPONSOR_EXEMPT_FILE_LOCATION }}" + SPONSOR_MINIMUM: "${{ vars.SPONSOR_MINIMUM }}"