{"id":22318347,"url":"https://github.com/codytseng/auto-comment-merge-conflicts","last_synced_at":"2025-07-29T12:31:26.646Z","repository":{"id":140991901,"uuid":"585935992","full_name":"CodyTseng/auto-comment-merge-conflicts","owner":"CodyTseng","description":"Github Action to automatically add a comment (and a label) to alert developers when there are merge conflicts","archived":false,"fork":false,"pushed_at":"2024-05-15T03:33:52.000Z","size":905,"stargazers_count":4,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-31T15:53:54.418Z","etag":null,"topics":["auto-comment","auto-label","github-actions","merge-conflicts"],"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/CodyTseng.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-06T13:47:23.000Z","updated_at":"2024-06-03T01:56:53.000Z","dependencies_parsed_at":"2024-12-03T23:13:14.703Z","dependency_job_id":"081cb4b8-3afd-431f-8619-801d21a1398b","html_url":"https://github.com/CodyTseng/auto-comment-merge-conflicts","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/CodyTseng/auto-comment-merge-conflicts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTseng%2Fauto-comment-merge-conflicts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTseng%2Fauto-comment-merge-conflicts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTseng%2Fauto-comment-merge-conflicts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTseng%2Fauto-comment-merge-conflicts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodyTseng","download_url":"https://codeload.github.com/CodyTseng/auto-comment-merge-conflicts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyTseng%2Fauto-comment-merge-conflicts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267686342,"owners_count":24127716,"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-07-29T02:00:12.549Z","response_time":2574,"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":["auto-comment","auto-label","github-actions","merge-conflicts"],"created_at":"2024-12-03T23:13:11.898Z","updated_at":"2025-07-29T12:31:26.245Z","avatar_url":"https://github.com/CodyTseng.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auto-comment-merge-conflicts\n\n\u003e Github Action to automatically add a comment (and a label) to alert developers when there are merge conflicts\n\n## Purpose\n\nThis action checks all unlocked open Pull Requests for merge conflicts and add a comment (and a label) if need. When a conflict is resolved the comment (and the label) is automatically removed.\n\n![effect](.github/images/effect.png)\n\n## Usage\n\n```\nname: Auto Comment Merge Conflicts\non: push\n\npermissions:\n  pull-requests: write\n\njobs:\n  auto-comment-merge-conflicts:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: codytseng/auto-comment-merge-conflicts@v1\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          comment-body: \"Merge Conflict\"\n          wait-ms: 3000\n          max-retries: 5\n          label-name: conflict\n          ignore-authors: dependabot,otherAuthor\n```\n\n### List of input options\n\n| input          | description                                                   | required | default        |\n| :------------- | :------------------------------------------------------------ | :------: | :------------- |\n| token          | GitHub token                                                  |   true   |                |\n| comment-body   | Comment body                                                  |  false   | Merge Conflict |\n| wait-ms        | Milliseconds between retries                                  |  false   | 3000           |\n| max-retries    | The number of retries when a PR mergeable status is `UNKNOWN` |  false   | 5              |\n| label-name     | Label name                                                    |  false   |                |\n| ignore-authors | Ignore some author's PR                                       |  false   |                |\n\n### List of output options\n\n| input               | description                                   |\n| :------------------ | :-------------------------------------------- |\n| new-conflicting-prs | List of all new conflicting PRs (json string) |\n| new-mergeable-prs   | List of all new mergeable PRs (json string)   |\n\nThe type of PR:\n\n```\n{\n  id: string;\n  number: number; // Identifies the pull request number.\n  title: string; // Identifies the pull request title.\n  url: string; // The HTTP URL for this pull request.\n  headRefName: string; // Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted.\n  baseRefName: string; // Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted.\n}\n```\n\n## How does it work?\n\n1. Get all unlocked open PRs. (Will wait `${wait-ms}` ms and retry if it contains a PR with `UNKNOWN` mergeable status.)\n2. If the mergeable status of PR is `CONFLICTING` and this PR has no `${comment-body}` comments, a `${comment-body}` comment will be automatically added.\n3. If the mergeable status of PR is `MERGEABLE` and this PR has a `${comment-body}` comment, the comment will be automatically removed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodytseng%2Fauto-comment-merge-conflicts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodytseng%2Fauto-comment-merge-conflicts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodytseng%2Fauto-comment-merge-conflicts/lists"}