From 7422556259ddcac9d6e5d80202f3e5a7d1654ccd Mon Sep 17 00:00:00 2001 From: taniashiba <126204004+taniashiba@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:18:49 -0400 Subject: [PATCH] hacktoberfest 2024 take action (#298) Co-authored-by: Tania Chakraborty Co-authored-by: Gabe <7622243+decentralgabe@users.noreply.github.com> --- .github/workflows/take.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/take.yml diff --git a/.github/workflows/take.yml b/.github/workflows/take.yml new file mode 100644 index 0000000..1df33ad --- /dev/null +++ b/.github/workflows/take.yml @@ -0,0 +1,26 @@ +name: Auto-assign issue to contributor +on: + issue_comment: + +jobs: + assign: + name: Take an issue + runs-on: ubuntu-latest + permissions: + issues: write + if: ${{ github.event.created_at >= format('{0}-10-01T00:00:00Z', github.event.created_at.substr(0,4)) && github.event.created_at <= format('{0}-10-31T23:59:59Z', github.event.created_at.substr(0,4)) }} + steps: + - name: take the issue + uses: bdougie/take-action@1439165ac45a7461c2d89a59952cd7d941964b87 + with: + message: Thanks for taking this issue! Let us know if you have any questions! + trigger: .take + token: ${{ secrets.GITHUB_TOKEN }} + + log_out_of_october: + name: Log when outside October + runs-on: ubuntu-latest + if: ${{ !(github.event.created_at >= format('{0}-10-01T00:00:00Z', github.event.created_at.substr(0,4)) && github.event.created_at <= format('{0}-10-31T23:59:59Z', github.event.created_at.substr(0,4))) }} + steps: + - name: Log skipped action + run: echo "Action skipped because the current date is not in October." \ No newline at end of file