{"id":15594298,"url":"https://github.com/orta/pull-lock","last_synced_at":"2025-05-06T19:41:20.788Z","repository":{"id":66647255,"uuid":"172414319","full_name":"orta/pull-lock","owner":"orta","description":"Run commands based on changes during a git pull","archived":false,"fork":false,"pushed_at":"2019-02-28T16:51:05.000Z","size":126,"stargazers_count":19,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T02:12:27.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/orta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-02-25T01:38:10.000Z","updated_at":"2024-11-12T06:55:12.000Z","dependencies_parsed_at":"2023-02-22T17:16:02.287Z","dependency_job_id":null,"html_url":"https://github.com/orta/pull-lock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Fpull-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Fpull-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Fpull-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Fpull-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orta","download_url":"https://codeload.github.com/orta/pull-lock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252755320,"owners_count":21799298,"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-03T00:37:22.918Z","updated_at":"2025-05-06T19:41:20.727Z","avatar_url":"https://github.com/orta.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pull Lock\n\nAutomate tasks that happen when you pull in new code.\n\n```json\n{\n  \"husky\": {\n    \"hooks\": {\n      \"post-merge\": \"pull-lock\"\n    }\n  },\n  \"pull-lock\": {\n    \"yarn.lock\": \"yarn install\",\n    \"Example/Podfile.lock\": [\"cd Example\", \"bundle exec pod install\"]\n  }\n}\n```\n\nLike [lint-staged](https://github.com/okonet/lint-staged) for when you've `git pull`ed. You set up a \n[husky](https://github.com/typicode/husky) `\"post-merge\"` hook which runs the CLI tool `pull-lock`. \n\n`pull-lock` will then compare the changed files to the config and execute commands for you automatically. \n\nPull Lock only uses dependencies which Husky also uses, and so it adds no new dependencies to your tree.\n\n## Installation and setup\n\n1. `yarn add --dev pull-lock husky`\n1. Update your `package.json` like this:\n\n```diff json\n{\n  \"husky\": {\n    \"hooks\": {\n+     \"post-merge\": \"pull-lock\"\n    }\n  },\n+ \"pull-lock\": {\n+   \"yarn.lock\": \"yarn install\",\n+ }\n}\n```\n\nThen when you run a `git pull` or `git merge`, `pull-lock` will check to see if `yarn.lock` has changed the \ndiffed files and run the scripts inside your config files.\n\nIn the case above, if someone has made dependency changes which edit the `yarn.lock` then `yarn install` will\nbe called automatically for you.\n\n## Advanced config\n\nAs pull-lock uses [cosmic-config](https://github.com/davidtheclark/cosmiconfig) you can leave your app\nsettings in either:\n\n* a `pull-lock` object in your `package.json`\n* a `.pulllockrc` file in JSON or YML format\n* a `pull-lock.config.js` file in JS format\n\n \n## Working on Pull Lock\n\n```sh\n# clone it\ngit clone https://github.com/orta/pull-lock.git\ncd pull-lock\n\n# set up deps\nyarn\n# verify tests\nyarn jest\n# Run the integration scripts to see it on a merge and on a pull\nyarn integrate:pull\n# or\nyarn integrate:merge\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forta%2Fpull-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forta%2Fpull-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forta%2Fpull-lock/lists"}