From 2e1523db681c151256732f4cb3ab8040d6735c16 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Mon, 9 Nov 2026 17:37:09 -0800 Subject: [PATCH] chore(bots): add the "Agent: task" workflow --- .github/workflows/task.yml | 36 ++++++++++++++++++++++++++++++++++++ AGENTS.md | 1 + 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/task.yml diff --git a/.github/workflows/task.yml b/.github/workflows/task.yml new file mode 100644 index 0000000..5220645 --- /dev/null +++ b/.github/workflows/task.yml @@ -0,0 +1,36 @@ +# Starts the Playwright bot with the task that you type. The bot does it with the skills of this +# repo, and opens the pull request as the app. Start it from the Actions tab. +name: "Agent: task" + +on: + workflow_dispatch: + inputs: + task: + description: What the bot should do + type: string + required: true + +permissions: {} + +jobs: + start: + name: Hand the task to the bot + if: github.repository == 'microsoft/playwright-cli' + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 + id: app-token + with: + client-id: ${{ vars.PLAYWRIGHT_APP_CLIENT_ID }} + private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }} + owner: microsoft + repositories: devops.playwright.dev + permission-actions: write + - name: Start the bot + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + TASK: ${{ inputs.task }} + run: >- + gh workflow run task.yml --repo microsoft/devops.playwright.dev --ref main + -f repo="$GITHUB_REPOSITORY" -f task="$TASK" diff --git a/AGENTS.md b/AGENTS.md index 0930d71..65aab32 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -63,5 +63,6 @@ The Playwright bot does the work below. It opens pull requests as the - `agent-task` on an issue: does what the issue asks, with the skills of this repo. - `agent-review` on a PR: revises the PR, as the maintainers' review comments say. - [roll.yml](.github/workflows/roll.yml) and [release.yml](.github/workflows/release.yml), from the Actions tab: they hand a task to the bot. Roll Playwright to `playwright@next`, as the roll skill says. Or open the `chore: mark v` PR with the release notes as its description, as the release skill says. Copy the notes into the release draft. +- [task.yml](.github/workflows/task.yml), from the Actions tab: hands the bot the task that you type, with the skills of this repo. Apply a label again to start another run.