{"id":18510803,"url":"https://github.com/envato/github-pull-request-buildkite-plugin","last_synced_at":"2025-04-09T04:33:24.094Z","repository":{"id":33866988,"uuid":"135950298","full_name":"envato/github-pull-request-buildkite-plugin","owner":"envato","description":"Open Github pull requests via your Buildkite builds","archived":false,"fork":false,"pushed_at":"2022-02-08T23:23:06.000Z","size":31,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":66,"default_branch":"main","last_synced_at":"2025-04-02T12:45:26.673Z","etag":null,"topics":["buildkite-plugin","github"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/envato.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}},"created_at":"2018-06-04T00:03:16.000Z","updated_at":"2024-05-04T18:12:35.000Z","dependencies_parsed_at":"2022-08-07T23:30:20.992Z","dependency_job_id":null,"html_url":"https://github.com/envato/github-pull-request-buildkite-plugin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fgithub-pull-request-buildkite-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fgithub-pull-request-buildkite-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fgithub-pull-request-buildkite-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fgithub-pull-request-buildkite-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/envato","download_url":"https://codeload.github.com/envato/github-pull-request-buildkite-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980833,"owners_count":21027803,"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":["buildkite-plugin","github"],"created_at":"2024-11-06T15:25:12.376Z","updated_at":"2025-04-09T04:33:23.736Z","avatar_url":"https://github.com/envato.png","language":"Shell","readme":"# Github Pull Request Buildkite Plugin\n\n[![tests](https://github.com/envato/github-pull-request-buildkite-plugin/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/envato/github-pull-request-buildkite-plugin/actions/workflows/tests.yml)\n\nA [Buildkite plugin](https://buildkite.com/docs/agent/v3/plugins) that lets you\nopen Github pull requests.\n\nOnce opened the number identifying the new Github pull request will be stored\nin the build meta-data with key: `github-pull-request-plugin-number`.\n\n## Example\n\nThe only required configuration is the pull request title. In this case the\npull request body will be empty, and the new pull request will propose merging\nthe current branch into `master`.\n\n```yml\nsteps:\n  - label: \":github: Open Pull Request\"\n    plugins:\n      - envato/github-pull-request#v0.4.0:\n          title: \"Example pull request title\"\n```\n\nOne can specify the branches to use. Here we open a pull request to merge the\n`feature-1` branch into `staging`.\n\n```yml\nsteps:\n  - label: \":github: Open Pull Request\"\n    plugins:\n      - envato/github-pull-request#v0.4.0:\n          title: \"Deploy feature-1 to staging\"\n          head: \"feature-1\"\n          base: \"staging\"\n```\n\nOne can specify a cross account pull request also:\n\n```yml\nsteps:\n  - label: \":github: Open Pull Request\"\n    plugins:\n      - envato/github-pull-request#v0.4.0:\n          title: \"Please accept my cool feature\"\n          head: \"my-account:my-branch\"\n          repo: \"someone-elses-account/project\"\n```\n\nTo request reviews:\n\n```yml\nsteps:\n  - label: \":github: Open Pull Request\"\n    plugins:\n      - envato/github-pull-request#v0.4.0:\n          title: \"Example pull request title\"\n          reviewers:\n            - toolmantim\n            - keithpitt\n          team-reviewers:\n            - a_team\n            - b_team\n```\n\nTo add labels:\n\n```yml\nsteps:\n  - label: \":github: Open Pull Request\"\n    plugins:\n      - envato/github-pull-request#v0.4.0:\n          title: \"Example pull request title\"\n          labels:\n            - wip\n            - security\n```\n\n## Authentication\n\nThis plugin needs to authenticate with Github to open pull requests. To do so\nit needs an API token. To provide this please store the token in the\n`GITHUB_TOKEN` environment variable.\n\nWhile this works, it's not recommended to commit unencrypted private tokens to\nSCM.\n\n```yml\nsteps:\n  - label: \":github: Open Pull Request (not recommended)\"\n    plugins:\n      - envato/github-pull-request#v0.4.0:\n          title: \"Example pull request title\"\n    env:\n      - GITHUB_TOKEN=\u003cmy-secret-token\u003e\n```\n\nInstead, provide your secrets in via a secure mechanisim. Perhaps using the\n[AWS S3 Secrets Buildkite Plugin](https://github.com/buildkite/elastic-ci-stack-s3-secrets-hooks#environment-variables).\n\n## Configuration\n\n### `title`\n\nThe title of the pull request.\n\n### `body` (optional)\n\nThe contents of the pull request. Add some context and description of the\nchanges being proposed.\n\n### `head` (optional)\n\nThe name of the branch where your changes are implemented. For cross-repository\npull requests in the same network, namespace head with a user like this:\n`username:branch`.\n\nDefault: `BUILDKITE_BRANCH` (The current branch being built)\n\n### `base` (optional)\n\nThe name of the branch you want the changes pulled into. This should be an\nexisting branch on the repository (see below).\n\nDefault: `master`\n\n### `repo` (optional)\n\nThe repository on which the proposed changes will be pulled into. In the form\n`owner/project`.\n\nDefault: The repository of the pipeline currently being built.\n\n### `reviewers` (optional)\n\nA list of users who will be requested to review the pull request. The reviewers\nmust be collaborators on the project.\n\n### `team-reviewers` (optional)\n\nA list of teams who will be requested to review the pull request. The teams\nmust be collaborators on the project.\n\n### `labels` (optional)\n\nA list of labels that will be added to the pull request.\n\n## Development\n\nTo run the tests:\n\n```sh\ndocker-compose run --rm tests\n```\n\nTo run the [Buildkite Plugin\nLinter](https://github.com/buildkite-plugins/buildkite-plugin-linter):\n\n```sh\ndocker-compose run --rm lint\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenvato%2Fgithub-pull-request-buildkite-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenvato%2Fgithub-pull-request-buildkite-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenvato%2Fgithub-pull-request-buildkite-plugin/lists"}