From 759b222869f5da4ce26d2d18be826bf258ed7a0e Mon Sep 17 00:00:00 2001 From: jan iversen Date: Fri, 21 Apr 2023 16:41:09 +0200 Subject: [PATCH] Add action to lock issues/PR. (#1508) --- .github/workflows/lock.yaml | 33 +++++++++++++++++++++++++++ .github/workflows/publish1.yml.NO_RUN | 27 ---------------------- .github/workflows/publish2.yml.NO_RUN | 27 ---------------------- .github/workflows/stale.yml | 7 ++---- 4 files changed, 35 insertions(+), 59 deletions(-) create mode 100644 .github/workflows/lock.yaml delete mode 100644 .github/workflows/publish1.yml.NO_RUN delete mode 100644 .github/workflows/publish2.yml.NO_RUN diff --git a/.github/workflows/lock.yaml b/.github/workflows/lock.yaml new file mode 100644 index 000000000..b6a8aba8d --- /dev/null +++ b/.github/workflows/lock.yaml @@ -0,0 +1,33 @@ +name: 'Lock Threads' + +on: + push: + branches: + - dev + - master + tags: + - v* + pull_request: + branches: + - dev + schedule: + # Every night at 02:20 UTC. + - cron: '20 2 * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +concurrency: + group: lock + +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v4 + with: + github-token: ${{ github.token }} + issue-inactive-days: '10' + pr-inactive-days: '10' diff --git a/.github/workflows/publish1.yml.NO_RUN b/.github/workflows/publish1.yml.NO_RUN deleted file mode 100644 index 923c7eab6..000000000 --- a/.github/workflows/publish1.yml.NO_RUN +++ /dev/null @@ -1,27 +0,0 @@ -name: TEST Upload Python Package - -on: - release: - # types: [created] - branches: ["no"] - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* diff --git a/.github/workflows/publish2.yml.NO_RUN b/.github/workflows/publish2.yml.NO_RUN deleted file mode 100644 index ea8ac4fd9..000000000 --- a/.github/workflows/publish2.yml.NO_RUN +++ /dev/null @@ -1,27 +0,0 @@ -name: TEST2 Upload Python Package - -on: - release: -# types: [created] - branches: ["no"] - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python3 -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python3 setup.py sdist bdist_wheel - twine upload dist/* diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 7ca7449d3..2b77d44a0 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -3,12 +3,11 @@ name: Mark stale issues and pull requests on: schedule: - cron: "30 1 * * *" + workflow_dispatch: jobs: stale: - runs-on: ubuntu-latest - steps: - uses: actions/stale@v3 with: @@ -22,8 +21,6 @@ jobs: days-before-issue-close: 5 days-before-pr-close: 10 stale-issue-label: 'no-issue-activity' - exempt-issue-labels: 'Bug,Enhancements,Investigating,in progress,Documentation Update Required,3.x' + exempt-issue-labels: 'Bug,Enhancements,Investigating' stale-pr-label: 'no-pr-activity' - exempt-pr-labels: 'IN REVIEW,Reviewing,Draft,in progress,3.x,2.5.0' remove-stale-when-updated: true -# only-labels: "More Information Required, Not an Issue, question, Won't Do"