{"id":13809262,"url":"https://github.com/c2corg/browserslist-update-action","last_synced_at":"2026-01-16T15:02:37.917Z","repository":{"id":36963084,"uuid":"369109468","full_name":"c2corg/browserslist-update-action","owner":"c2corg","description":"A Github Action that runs `npx update-browserslist-db@latest` on a repository and proposes a pull request to merge updates.","archived":false,"fork":false,"pushed_at":"2024-07-18T07:20:16.000Z","size":5348,"stargazers_count":36,"open_issues_count":16,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-07-19T03:02:30.657Z","etag":null,"topics":["github-actions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c2corg.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":"2021-05-20T06:49:47.000Z","updated_at":"2024-07-19T03:02:30.658Z","dependencies_parsed_at":"2024-01-08T07:59:40.416Z","dependency_job_id":"e192fdf7-b79c-42b2-a6bd-baac8877ca83","html_url":"https://github.com/c2corg/browserslist-update-action","commit_stats":{"total_commits":613,"total_committers":8,"mean_commits":76.625,"dds":"0.12887438825448616","last_synced_commit":"08db6407a0946536cafa66d35e2d43c40c1989d5"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c2corg%2Fbrowserslist-update-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c2corg%2Fbrowserslist-update-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c2corg%2Fbrowserslist-update-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c2corg%2Fbrowserslist-update-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c2corg","download_url":"https://codeload.github.com/c2corg/browserslist-update-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213870460,"owners_count":15650178,"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","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":["github-actions"],"created_at":"2024-08-04T01:02:13.476Z","updated_at":"2026-01-16T15:02:32.855Z","avatar_url":"https://github.com/c2corg.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# browserslist-update-action\n\nA GitHub Action that runs `update-browserslist-db@latest` on a repository and proposes a pull request to merge updates. Since v2.5, also supports other package managers (yarn, pnpm, bun, deno).\n\n## v2 vs v1\n\n`v1` uses command `browserslist@latest --update-db` which is now deprecated and to be removed in a future major `browserslist` release. It should be dropped in favor of `v2` which uses new command `update-browserslist-db@latest`.\n\n:warning: v2 requires at least Node 15 (`npm` 6). Stick to `v1` otherwise.\n\n## Usage\n\n```yaml\nname: Update Browserslist database\n\non:\n  schedule:\n    - cron: '0 2 1,15 * *'\n\npermissions:\n  contents: write\n  pull-requests: write\n\njobs:\n  update-browserslist-database:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n        with:\n          fetch-depth: 0\n      - name: Configure git\n        run: |\n          # Setup for commiting using built-in token. See https://github.com/actions/checkout#push-a-commit-using-the-built-in-token\n          git config user.name \"github-actions[bot]\"\n          git config user.email \"41898282+github-actions[bot]@users.noreply.github.com\"\n      - name: Update Browserslist database and create PR if applies\n        uses: c2corg/browserslist-update-action@v2\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          branch: browserslist-update\n          base_branch: main\n          commit_message: 'build: update Browserslist db'\n          title: 'build: update Browserslist db'\n          body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/)\n          labels: 'chores, github action'\n          reviewers: 'user1,user2,user3'\n          teams: 'team1'\n```\n\n\u003e [!IMPORTANT]\n\u003e This action can only create a pull request if the _Allow GitHub Actions to create and approve pull requests_ option is enabled in _Settings \u003e Actions \u003e General_.\n\n## Action inputs\n\nInputs with defaults are **optional**.\n\n| Name           | Description                                                                                                                                                                                               | Default                                                                           |\n| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |\n| github_token   | `GITHUB_TOKEN` (`contents: write`, `pull-requests: write`) or a `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). | `GITHUB_TOKEN`                                                                    |\n| branch         | The pull request branch name.                                                                                                                                                                             | `browserslist-update`                                                             |\n| base_branch    | The target branch into which the pull request will be merged.                                                                                                                                             | `master`                                                                          |\n| directory      | For monorepos, the directory to switch to when running action                                                                                                                                             | `.`                                                                               |\n| commit_message | The message to use when committing changes.                                                                                                                                                               | `Update caniuse database`                                                         |\n| title          | The title of the pull request.                                                                                                                                                                            | `📈 Update caniuse database`                                                      |\n| body           | The body of the pull request.                                                                                                                                                                             | `Caniuse database has been updated. Review changes, merge this PR and have a 🍺.` |\n| labels         | A comma separated list of labels to apply to the pull request.                                                                                                                                            | (no label)                                                                        |\n| reviewers      | A comma separated list of users (either login or id) to be added to the the pull request reviewers list.                                                                                                  | (no users)                                                                        |\n| teams          | A comma separated list of teams (either name or id) to be added to the the pull request reviewers list.                                                                                                   | (no teams)                                                                        |\n\nOne will usually run this action on a cron basis (say, every day or week)\n\n## Action outputs\n\n| Name      | Description                                                                                        |\n| --------- | -------------------------------------------------------------------------------------------------- |\n| has_pr    | `true` if changes were found and a pull request was created or updated, `false` otherwise.         |\n| pr_number | The number of the pull requested created or updated, if applies.                                   |\n| pr_status | Can be either `created` or `updated` depending on whether the pull request was created or updated. |\n\n## Contributing\n\n### Edit / add GraphQL queries and mutations\n\n`src/generated` folder contains generated type definitions based on queries. Run `npm run graphql` to update.\n\n### Release a version\n\n```sh\nnpm run lint\nnpm run build\nnpm run pack\n```\n\nOr shortly\n\n```sh\nnpm run all\n```\n\nThen bump version number in `package.json` and `package-lock.json`. Push commits.\n\nKeep a major version tag synchronized with updates, e.g. if you publish version `v2.0.3`, then a `v2` branch should be positioned at the same location.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc2corg%2Fbrowserslist-update-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc2corg%2Fbrowserslist-update-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc2corg%2Fbrowserslist-update-action/lists"}