From b479e0e22cc5781073d85c339a7351d52142b8c9 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Sun, 13 Jul 2025 23:43:52 -0500 Subject: [PATCH] use single workflow script --- .gitea/workflows/process-pull-requests.yaml | 35 ------------------- ...ss-issues.yaml => process-repository.yaml} | 25 +++++++------ 2 files changed, 15 insertions(+), 45 deletions(-) delete mode 100644 .gitea/workflows/process-pull-requests.yaml rename .gitea/workflows/{process-issues.yaml => process-repository.yaml} (51%) diff --git a/.gitea/workflows/process-pull-requests.yaml b/.gitea/workflows/process-pull-requests.yaml deleted file mode 100644 index 3e2a032..0000000 --- a/.gitea/workflows/process-pull-requests.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: process-pull-requests - -on: - schedule: - - cron: '@daily' - -jobs: - process-pull-requests: - runs-on: ubuntu-latest - steps: - - name: Checkout Python Script - uses: actions/checkout@v4 - with: - repository: alexlebens/workflow-scripts - ref: main - token: ${{ secrets.BOT_TOKEN }} - path: scripts - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.13' - - - name: Install dependencies - run: pip install requests - - - name: Run Script - env: - INSTANCE_URL: ${{ vars.INSTANCE_URL }} - REPOSITORY: ${{ gitea.repository }} - TOKEN: ${{ secrets.BOT_TOKEN }} - STALE_DAYS: 3 - STALE_TAG: 23 - REQUIRED_TAG: 22 - run: python ./scripts/scripts/process-pull-requests.py diff --git a/.gitea/workflows/process-issues.yaml b/.gitea/workflows/process-repository.yaml similarity index 51% rename from .gitea/workflows/process-issues.yaml rename to .gitea/workflows/process-repository.yaml index fd25d88..f4560d8 100644 --- a/.gitea/workflows/process-issues.yaml +++ b/.gitea/workflows/process-repository.yaml @@ -1,11 +1,11 @@ -name: process-issues +name: process-repository on: schedule: - - cron: '@daily' + - cron: "@daily" jobs: - process-issues: + process-repository: runs-on: ubuntu-latest steps: - name: Checkout Python Script @@ -14,22 +14,27 @@ jobs: repository: alexlebens/workflow-scripts ref: main token: ${{ secrets.BOT_TOKEN }} - path: scripts + path: workflow-scripts - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: "3.13" - name: Install dependencies - run: pip install requests + run: pip install requests immutabledict - name: Run Script env: INSTANCE_URL: ${{ vars.INSTANCE_URL }} + OWNER: ${{ gitea.owner }} REPOSITORY: ${{ gitea.repository }} TOKEN: ${{ secrets.BOT_TOKEN }} - STALE_DAYS: 3 - STALE_TAG: 23 - EXCLUDE_TAG: 17 - run: python ./scripts/scripts/process-issues.py + LOG_LEVEL: DEBUG + ISSUE_STALE_DAYS: 3 + ISSUE_STALE_TAG: 23 + ISSUE_EXCLUDE_TAG: 17 + PULL_REQUEST_STALE_DAYS: 3 + PULL_REQUEST_STALE_TAG: 23 + PULL_REQUEST_REQUIRED_TAG: 22 + run: python ./workflow-scripts/scripts/process-repository.py