From df1cde5a2789db26d943d0938753e2feeffee116 Mon Sep 17 00:00:00 2001 From: SyntaxJoker <124054462+SyntaxJoker@users.noreply.github.com> Date: Mon, 20 Feb 2023 23:50:13 +0100 Subject: [PATCH] Add github actions (#508) * Add add_to_project.yml action * add close_inactive action --- .github/workflows/add_to_project.yml | 19 +++++++++++++++++++ .github/workflows/close_inactive.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/add_to_project.yml create mode 100644 .github/workflows/close_inactive.yml diff --git a/.github/workflows/add_to_project.yml b/.github/workflows/add_to_project.yml new file mode 100644 index 000000000..45ddf8b42 --- /dev/null +++ b/.github/workflows/add_to_project.yml @@ -0,0 +1,19 @@ +name: Add new issues and pr to project + +on: + pull_request: + types: + - opened + issues: + types: + - opened + +jobs: + add-to-project: + name: Add new issue and pr to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.4.0 + with: + project-url: https://github.com/orgs/tabler/projects/9/views/1 + github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} diff --git a/.github/workflows/close_inactive.yml b/.github/workflows/close_inactive.yml new file mode 100644 index 000000000..f17b14e27 --- /dev/null +++ b/.github/workflows/close_inactive.yml @@ -0,0 +1,26 @@ +name: Close inactive issues and pr + +on: + schedule: + - cron: "00 11 * * *" + +jobs: + test: + runs-on: ubuntu-latest + permissions: + pull-requests: write + issues: write + steps: + - uses: actions/stale@v5 + with: + days-before-issue-stale: 360 + days-before-issue-close: 14 + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for 360 days with no activity." + close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." + repo-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + days-before-pr-stale: 360 + days-before-pr-close: 14 + stale-pr-label: "stale" + stale-pr-message: "This pr is stale because it has been open for 360 days with no activity." + close-pr-message: "This pr was closed because it has been inactive for 14 days since being marked as stale."