{"id":21835823,"url":"https://github.com/vtex/github-pull-request-script","last_synced_at":"2025-04-14T09:14:44.192Z","repository":{"id":37872245,"uuid":"244518207","full_name":"vtex/github-pull-request-script","owner":"vtex","description":"This script automates the process of creating pull requests with specific changes in multiple repositories.","archived":false,"fork":false,"pushed_at":"2023-07-18T21:08:36.000Z","size":1526,"stargazers_count":15,"open_issues_count":18,"forks_count":6,"subscribers_count":110,"default_branch":"main","last_synced_at":"2025-04-14T09:14:39.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/vtex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-03-03T01:59:03.000Z","updated_at":"2024-08-26T18:40:35.000Z","dependencies_parsed_at":"2024-11-27T20:38:18.497Z","dependency_job_id":null,"html_url":"https://github.com/vtex/github-pull-request-script","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/vtex%2Fgithub-pull-request-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fgithub-pull-request-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fgithub-pull-request-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Fgithub-pull-request-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vtex","download_url":"https://codeload.github.com/vtex/github-pull-request-script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852183,"owners_count":21171842,"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-27T20:25:11.734Z","updated_at":"2025-04-14T09:14:44.134Z","avatar_url":"https://github.com/vtex.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github Pull Request Script\n\nThis script automates the process of creating pull requests with specific changes in multiple repositories.\n\n## Running the script\n\nUse the package manager [yarn](https://yarnpkg.com/) to install the dependencies.\n\n```bash\nyarn install\n```\n\nTo execute the script, run `yarn go`. Example:\n\n![example](https://user-images.githubusercontent.com/26108090/81767321-7c5e5a00-94ae-11ea-964d-d4d15d793c74.png)\n\nCommand line options:\n\n```\n--delete-after  Delete each local clone after creating the pull request\n--dry-run       Execute all the script steps except pushing and creating the pull request\n```\n\n## Configuring\n\nEvery configuration needed can be set in the `config/` directory.\n\n- The `repos.json` is a list of github repository full names: `owner-or-org/repository-name`.\n\n- The `config.ts` file configures multiple settings of the script:\n\n```js\nexport default {\n  // The github token used to create pull requests\n  githubToken: process.env.GH_TOKEN,\n  // Name of the branch to make the changes\n  branchName: 'chore/community-chores',\n  // If the script should delete each local clone after creating the pull request\n  deleteAfter: false,\n  // Execute all the script steps except pushing and creating the pull request.\n  dryRun: true,\n  // Title and body of the PR that's going to be created\n  // Use `%task_list%` to insert a list of changes made.\n  pr: {\n    title: 'A pr title',\n    body: `\nA pr body\n\nWith the following changes:\n\n%task_list%`,\n  },\n  // Dictionary of tasks to be executed.\n  tasks: {\n    codeowners: taskCodeOwners,\n    contributors: taskContributors,\n  },\n}\n```\n\n## Tasks\n\nA task is an object containing a `name`, and a `task` function used to modify the current repository being worked on.\n\nEvery task should return `undefined` or an object containing:\n\n- `changes` - an object with the following properties\n- `type` - a keep-a-changelog action: `added`,`changed`,`deprecated`,`removed`,`fixed`,`security`\n- `message` - a message pointing out the change made\n- `changelog` - a boolean. If set to `true`, this change will be added to the `CHANGELOG.md`.\n\nThe `process.cwd()` is changed for each repository being currently worked on. This way you can use the current working directory to resolve files from the root of each repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex%2Fgithub-pull-request-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvtex%2Fgithub-pull-request-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex%2Fgithub-pull-request-script/lists"}