{"id":19428533,"url":"https://github.com/web-platform-tests/wpt-pr-bot","last_synced_at":"2025-09-08T03:31:29.248Z","repository":{"id":9124369,"uuid":"10910985","full_name":"web-platform-tests/wpt-pr-bot","owner":"web-platform-tests","description":"Home of the wpt-pr-bot","archived":false,"fork":false,"pushed_at":"2024-07-01T12:49:55.000Z","size":1158,"stargazers_count":31,"open_issues_count":34,"forks_count":36,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-08T15:05:46.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web-platform-tests.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-06-24T14:47:18.000Z","updated_at":"2025-03-21T03:23:14.000Z","dependencies_parsed_at":"2024-01-19T22:40:10.972Z","dependency_job_id":"2e15def7-e0e5-40f5-9c22-744548390026","html_url":"https://github.com/web-platform-tests/wpt-pr-bot","commit_stats":{"total_commits":357,"total_committers":23,"mean_commits":"15.521739130434783","dds":"0.47058823529411764","last_synced_commit":"f03de165700a8dcb8ab47b0a15c8c0be9f083fe2"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/web-platform-tests/wpt-pr-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-platform-tests%2Fwpt-pr-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-platform-tests%2Fwpt-pr-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-platform-tests%2Fwpt-pr-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-platform-tests%2Fwpt-pr-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web-platform-tests","download_url":"https://codeload.github.com/web-platform-tests/wpt-pr-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-platform-tests%2Fwpt-pr-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274128210,"owners_count":25226967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T14:15:32.399Z","updated_at":"2025-09-08T03:31:28.810Z","avatar_url":"https://github.com/web-platform-tests.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"wpt-pr-bot\n======\n\nA helper bot for web-platform-tests.\n\nAuthoring tests\n=====\n\nFor the purposes of automated testing, this project uses [the `replay`\nmodule](https://www.npmjs.com/package/replay) to record responses from the\nGitHub HTTP API. Contributors seeking to add new tests or modify existing tests\nwill need to capture new request/response pairs. This can be achieved as\nfollows:\n\n1. Create a \"personal access token\" though GitHub.com (no particular access\n   scopes are necessary)\n2. Set the `GITHUB_TOKEN` environment variable to the value created above, set\n   the `REPLAY` environment variable to `record`, and run the tests.\n3. If the tests pass, include the files that were generated by the previous\n   command in the patch.\n\nDevelopment\n=====\n\nRequirements:\n- Node v18\n\n### Getting Started\n\nDownload the dependencies\n\n```bash\nnpm install\n```\n\n### Running Tests\n\nTo lint and run the tests, run:\n\n```bash\nnpm run test\n```\n\nDeploying\n=====\n\n1. Deploy:\n   - ```bash\n     # Create a variable to represent the version\n     VERSION_ID=\"rev-$(git rev-parse --short HEAD)\"\n\n     # Deploy the new version but do not promote it\n     gcloud --project=wpt-pr-bot app deploy --no-promote -v \"${VERSION_ID}\"\n     ```\n2. Check the logs for the instance\n   - ```bash\n     gcloud --project=wpt-pr-bot app logs tail -s default -v \"${VERSION_ID}\"\n     ```\n   - Check to make sure that the app has started. It should\n     [print](https://github.com/web-platform-tests/wpt-pr-bot/blob/main/index.js#L121)\n     `App started in ....`\n3. Redirect traffic to the new version.\n   - ```bash\n     gcloud --project=wpt-pr-bot app services set-traffic default \\\n         --splits=\"${VERSION_ID}\"=1\n     ```\n4. Keep only 2 versions of the app (VERSION_ID and the previous version).\n   To delete older versions:\n   - ```bash\n     # Check the number of versions. There should only be two.\n     gcloud --project=wpt-pr-bot app versions list --service=default\n     # If there are more than two. Get the version id.\n     # Given old version ${REALLY_OLD_VERSION_ID}, delete it.\n     gcloud --project=wpt-pr-bot app versions delete \\\n         ${REALLY_OLD_VERSION_ID} --service=default\n     ```\n5. Monitor the \"Recent Deliveries\"\n[tab](https://github.com/web-platform-tests/wpt/settings/hooks/161784539?tab=deliveries)\nin wpt. If there are any failures, use the command in step 2 to tail the logs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-platform-tests%2Fwpt-pr-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb-platform-tests%2Fwpt-pr-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-platform-tests%2Fwpt-pr-bot/lists"}