diff --git a/.github/workflows/assign.yml b/.github/workflows/assign.yml new file mode 100644 index 0000000..de91708 --- /dev/null +++ b/.github/workflows/assign.yml @@ -0,0 +1,19 @@ +name: Assign Issue to Creator + +on: + issues: + types: + - opened + +jobs: + assign-to-creator: + runs-on: ubuntu-latest + + steps: + - name: Assign Issue to Creator + uses: peter-evans/create-or-update-issue@v2 + with: + issue: ${{ github.event.issue.number }} + assignees: ${{ github.event.issue.user.login }} + env: + GITHUB_TOKEN: ${{ secrets.SNOW }} diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..2fd7b17 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,29 @@ +name: Assign Contribution Label + +on: + issues: + types: + - opened + +jobs: + assign-contribution-label: + runs-on: ubuntu-latest + + steps: + - name: Assign Contribution Label + uses: actions/github-script@v7 + with: + script: | + const issueNumber = context.payload.issue.number; + + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issueNumber, + labels: ['contribution'], + }); + + env: + GITHUB_TOKEN: ${{ secrets.SNOW }} + + diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..db285dd --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,29 @@ +# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/actions/stale +name: Mark stale issues and pull requests + +on: + schedule: + - cron: '23 20 * * *' + +jobs: + stale: + + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/stale@v5 + with: + repo-token: ${{ secrets.SNOW }} + stale-issue-message: 'We noticed that this Issue has been inactive for quite some time. 🥺' + stale-pr-message: 'This PR has no activity, Maintainers and Reviewers we need help here 💖' + stale-issue-label: 'inactive-issue' + stale-pr-label: 'pr-review-asap' + days-before-issue-stale: 5 + days-before-pr-stale: 3 diff --git a/workflows/greeting.yml b/workflows/greeting.yml deleted file mode 100644 index 1fe8edc..0000000 --- a/workflows/greeting.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Greetings - -on: [pull_request_target, issues] - -jobs: - greeting: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: "Hey Contributor! Congratulations on taking your first ever step into the open-source journney" - pr-message: "Perfection! Your first every PR :) "