{"id":15632016,"url":"https://github.com/jaymzh/main-branch-check-action","last_synced_at":"2026-04-03T00:46:51.355Z","repository":{"id":240856581,"uuid":"803624515","full_name":"jaymzh/main-branch-check-action","owner":"jaymzh","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-21T22:32:23.000Z","size":440,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T15:01:18.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/jaymzh.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":"2024-05-21T04:51:09.000Z","updated_at":"2024-05-21T22:32:26.000Z","dependencies_parsed_at":"2024-05-21T05:42:01.484Z","dependency_job_id":"7bc33f4a-1fc4-4025-b15f-a159178d69df","html_url":"https://github.com/jaymzh/main-branch-check-action","commit_stats":null,"previous_names":["jaymzh/main-branch-check-action"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jaymzh/main-branch-check-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaymzh%2Fmain-branch-check-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaymzh%2Fmain-branch-check-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaymzh%2Fmain-branch-check-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaymzh%2Fmain-branch-check-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaymzh","download_url":"https://codeload.github.com/jaymzh/main-branch-check-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaymzh%2Fmain-branch-check-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261832677,"owners_count":23216497,"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":[],"created_at":"2024-10-03T10:42:22.791Z","updated_at":"2026-04-03T00:46:51.348Z","avatar_url":"https://github.com/jaymzh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# main-branch-check action\n\n[![Build](https://github.com/jaymzh/main-branch-check-action/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/jaymzh/main-branch-check-action/actions/workflows/build.yaml)\n[![CodeQL](https://github.com/jaymzh/main-branch-check-action/actions/workflows/codeql.yml/badge.svg)](https://github.com/jaymzh/main-branch-check-action/actions/workflows/codeql.yml)\n[![Lint](https://github.com/jaymzh/main-branch-check-action/actions/workflows/lint.yaml/badge.svg)](https://github.com/jaymzh/main-branch-check-action/actions/workflows/lint.yaml)\n\nThis check will determine the workflow it was called from, then\nsee if the workflow has run on master, and if it has, ensure\nit is passing.\n\nTo bypass this (e.g. if your PR is the fix), you can add:\n\n```text\n[ci override_main_branch_checks $WORKFLOW]'\n```\n\nOr you to set all checks to non-fatal, you can do:\n\n```text\n[ci override_main_branch_checks]\n```\n\nto your PR description.\n\n## Using\n\nTo use this, add a step into your workflow (or a separate job with this step)\nlike:\n\n```yaml\n- name: Main Branch Check\n  # Do the check even if the PR failed elsewhere,\n  # but don't do it if we're on main\n  if: always() \u0026\u0026 github.ref != 'refs/heads/main'\n  uses: jaymzh/main-branch-check-action@main\n  with:\n    gh_token: ${{ secrets.GITHUB_TOKEN }}\n    workflow_ref: ${{ github.workflow_ref }}\n```\n\nIf your branch name is different than \"main\" you will need to update\nthe ref in the `if` as well as pass it in using `with`:\n\n```yaml\n...\n  with:\n    ...\n    main_branch: \"some_branch_name\"\n```\n\nIn most cases the standard dyanmic per-PR token that GitHub generates\nwill work just fine.\n\n## Updating\n\nIf you update the code, run:\n\n```bash\nmake\n```\n\nto build the self-contained bundle.\n\nIf you update dependencies you'll need to run `npm install` first\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymzh%2Fmain-branch-check-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaymzh%2Fmain-branch-check-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymzh%2Fmain-branch-check-action/lists"}