{"id":18906875,"url":"https://github.com/sequelize/pr-auto-update-and-handle-conflicts","last_synced_at":"2025-04-15T04:31:49.509Z","repository":{"id":232415145,"uuid":"783797365","full_name":"sequelize/pr-auto-update-and-handle-conflicts","owner":"sequelize","description":"Automatically update PR branches based on filters \u0026 execute an action on conflict","archived":false,"fork":false,"pushed_at":"2024-04-12T11:56:43.000Z","size":2602,"stargazers_count":2,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T16:21:29.654Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sequelize.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-08T15:34:11.000Z","updated_at":"2024-04-10T10:10:12.000Z","dependencies_parsed_at":"2024-04-12T03:32:23.631Z","dependency_job_id":"b183e96e-655f-49aa-8017-286a5279f859","html_url":"https://github.com/sequelize/pr-auto-update-and-handle-conflicts","commit_stats":null,"previous_names":["sequelize/pr-auto-update-and-conflict-notify"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequelize%2Fpr-auto-update-and-handle-conflicts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequelize%2Fpr-auto-update-and-handle-conflicts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequelize%2Fpr-auto-update-and-handle-conflicts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequelize%2Fpr-auto-update-and-handle-conflicts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sequelize","download_url":"https://codeload.github.com/sequelize/pr-auto-update-and-handle-conflicts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249006475,"owners_count":21197282,"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-11-08T09:19:01.856Z","updated_at":"2025-04-15T04:31:48.175Z","avatar_url":"https://github.com/sequelize.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PR auto-update and conflict handling\n\nThis action is used to automatically update a PR with the latest changes from the base branch\nand label or draft it PR if there are any conflicts.\n\n## Example usage\n\n```yaml\nname: auto-update PRs \u0026 label conflicts\non:\n  # The push event is the most important event.\n  # This event should allow any branch that is going to be used as a target branch for a PR.\n  # This event is responsible for updating the PRs with the latest changes from the base branch,\n  # and adding the 'conflict' label if there are any conflicts.\n  push:\n    branches:\n      - main\n  # can also be used with the pull_request event\n  pull_request_target:\n    types:\n      # If you are using the \"label conflicts\" feature,\n      # This event will be used to remove the 'conflict' label when the PR is updated and the conflicts are resolved.\n      - synchronize\n      # OPTIONAL: If you use the \"label conflicts\" feature, adding these two types\n      # will allow the workflow to correct any label incorrectly added or removed by a user.\n      # It is also useful to run the workflow when labels change\n      # if one of the x-requires-labels or x-excluded-labels option is used.\n      - labeled\n      - unlabeled\n      # OPTIONAL: If you are using the \"auto merge\" feature, and\n      # \"update-requires-auto-merge\" is set to true, this event will be used to update the PR\n      # as soon as the auto-merge is enabled.\n      - auto_merge_enabled\n      # OPTIONAL: If you use \"conflict-requires-ready-state\" or \"update-requires-ready-state\",\n      # then using one of the following types will allow the workflow\n      # to execute as soon as they are in the specified state.\n      - ready_for_review\n      - converted_to_draft\n      # OPTIONAL: In case a PR is opened in an already conflicted or outdated state\n      - opened\n      # OPTIONAL: The workflow does not run on closed PRs, so this allows the workflow to update\n      # the state of the PR if it is reopened.\n      - reopened\njobs:\n  autoupdate:\n    runs-on: ubuntu-latest\n    steps:\n      # This step is only necessary if you want to update branches from forks,\n      # as it uses a completely different process (git) than updating branches from the same repository (api call).\n      - name: Configure git\n        run: |\n          # The username of the \"UPDATE_FORK_PAT\" owner\n          git config --global user.name \"username\"\n          # The email of the \"UPDATE_FORK_PAT\" owner\n          git config --global user.email \"email@example.com\"\n      - uses: sequelize/pr-auto-update-and-handle-conflicts@v1\n        with:\n          conflict-label: 'conflicted'\n          conflict-requires-ready-state: 'ready_for_review'\n          conflict-excluded-authors: 'bot/renovate'\n          update-pr-branches: true\n          update-requires-auto-merge: true\n          update-requires-ready-state: 'ready_for_review'\n          update-excluded-authors: 'bot/renovate'\n          update-excluded-labels: 'no-autoupdate'\n        env:\n          # The GITHUB_TOKEN to use for all operations, unless one of the two properties\n          # below are specified.\n          GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'\n\n          # The default GITHUB_TOKEN does not cause the branch update to trigger subsequent workflows, \n          # which means that CI checks will not run on the updated branch.\n          # To solve this, you need to use a different token. Either one that belongs to a user, or to a GitHub App.\n          # Defaults to the GITHUB_TOKEN env\n          UPDATE_BRANCH_PAT: '${{ secrets.UPDATE_BRANCH_PAT }}'\n          \n          # Same reasoning as UPDATE_BRANCH_PAT, but for updating branches from a fork.\n          # This one _requires_ using a user PAT. A GitHub App PAT will not work if the update includes workflow files.\n          # This token must have the Read \u0026 Write permissions for \"contents\" and \"workflows\"\n          # If you do not want to update branches from forks, you can set the \"update-requires-source\" option to \"branches\"\n          # Defaults to the GITHUB_TOKEN env\n          UPDATE_FORK_PAT: '${{ secrets.PAT }}'\n          UPDATE_FORK_USERNAME: 'ephys'\n```\n\n## Options\n\nTake a look at [action.yml](./action.yml) for the full list of options.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsequelize%2Fpr-auto-update-and-handle-conflicts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsequelize%2Fpr-auto-update-and-handle-conflicts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsequelize%2Fpr-auto-update-and-handle-conflicts/lists"}