Unverified Commit d78de156 authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

workflows/bot: rename from labels

This workflow / script is already doing more than must labeling: it's
already auto-closing package request issues.

Since we're going to migrate the nixpkgs-merge-bot into this workflow,
we'll rename things to a more generic name.
parent 75119422
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# This file is used by .github/workflows/labels.yml
# This file is used by .github/workflows/bot.yml
# This version is only run for Pull Requests from development branches like staging-next, haskell-updates or python-updates.

"4.workflow: package set update":
+1 −1
Original line number Diff line number Diff line
# This file is used by .github/workflows/labels.yml
# This file is used by .github/workflows/bot.yml
# This version uses `sync-labels: false`, meaning that a non-match will NOT remove the label

# keep-sorted start case=no numeric=yes newline_separated=yes skip_lines=1
+1 −1
Original line number Diff line number Diff line
# This file is used by .github/workflows/labels.yml
# This file is used by .github/workflows/bot.yml
# This version uses `sync-labels: true`, meaning that a non-match will remove the label

# keep-sorted start case=no numeric=yes newline_separated=yes skip_lines=1
+5 −5
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
# access to the GitHub API. This means that it should not evaluate user input in
# a way that allows code injection.

name: Labels
name: Bot

on:
  schedule:
@@ -21,7 +21,7 @@ on:
concurrency:
  # This explicitly avoids using `run_id` for the concurrency key to make sure that only
  # *one* scheduled run can run at a time.
  group: labels-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number }}
  group: bot-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number }}
  # PR-triggered runs will be cancelled, but scheduled runs will be queued.
  cancel-in-progress: ${{ github.event_name != 'schedule' }}

@@ -36,7 +36,7 @@ defaults:
    shell: bash

jobs:
  update:
  run:
    runs-on: ubuntu-24.04-arm
    if: github.event_name != 'schedule' || github.repository_owner == 'NixOS'
    steps:
@@ -64,13 +64,13 @@ jobs:
          GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
        run: gh api /rate_limit | jq

      - name: Labels from API data and Eval results
      - name: Run bot
        uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
        with:
          github-token: ${{ steps.app-token.outputs.token || github.token }}
          retries: 3
          script: |
            require('./ci/github-script/labels.js')({
            require('./ci/github-script/bot.js')({
              github,
              context,
              core,
+3 −3
Original line number Diff line number Diff line
@@ -100,10 +100,10 @@ jobs:
      systems: ${{ needs.prepare.outputs.systems }}
      testVersions: ${{ contains(fromJSON(needs.prepare.outputs.touched), 'pinned') && !contains(fromJSON(needs.prepare.outputs.headBranch).type, 'development') }}

  labels:
    name: Labels
  bot:
    name: Bot
    needs: [prepare, eval]
    uses: ./.github/workflows/labels.yml
    uses: ./.github/workflows/bot.yml
    permissions:
      issues: write
      pull-requests: write
Loading