Add cdp.browser_control: high-level browser automation API
#73
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Label PRs and auto-comment" | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| pr_label_comment: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@main | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const pr_number = context.payload.pull_request.number; | |
| // Add label | |
| try { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: pr_number, | |
| labels: ["needs-review", "copilot"] // <-- TUNE ME | |
| }); | |
| console.log(`✅ Added labels to PR #${pr_number}`); | |
| } catch (error) { | |
| console.log(`⚠️ Failed to add labels: ${error.message}`); | |
| console.log("Note: This may be due to insufficient permissions or invalid label names."); | |
| } | |
| // Add automated comment | |
| try { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: pr_number, | |
| body: "Thanks for the PR! Copilot will assist with review." | |
| }); | |
| console.log(`✅ Added comment to PR #${pr_number}`); | |
| } catch (error) { | |
| console.log(`⚠️ Failed to add comment: ${error.message}`); | |
| console.log("Note: This may be due to insufficient permissions."); | |
| } |