# クエリ パラメーターを使って pull request を作成する

クエリ パラメーターを使用して、事前入力されたタイトル、説明、ラベルなどを含むプル要求を開くカスタム URL を作成します。

比較 URL にクエリ パラメーターを追加して、事前に設定されたフィールドを含むプル要求を開くことができます。 pull request テンプレートについては、 [リポジトリ用のプルリクエストテンプレートの作成](/ja/enterprise-server@3.22/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository) を参照してください。

| パラメーター       | Purpose                                                                             | 例                                                                                                                  |
| ------------ | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `quick_pull` | 比較されたブランチの \[Pull request を開く] ページを開きます。                                            | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1`                                      |
| `title`      | pull request タイトルを追加します。 スペースには `+` を使用します。                                         | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&labels=bug&title=Bug+fix`             |
| `body`       | pull request 本文にテキストを追加します。 スペースには `+` を使用します。                                      | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&title=Bug+fix&body=Describe+the+fix.` |
| `labels`     | 1 つ以上のラベルを追加します。 複数のラベルはコンマで区切ります。                                                  | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&labels=help+wanted,bug`               |
| `milestone`  | マイルストーンを追加します。 スペースには `+` を使用します。                                                   | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&milestone=testing+milestones`         |
| `assignees`  | プル要求を 1 人以上のユーザーに割り当てます。 複数のユーザーをコンマで区切ります。                                         | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&assignees=octocat`                    |
| `projects`   | プル要求をプロジェクトに追加します。                                                                  | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&title=Bug+fix&projects=octo-org/1`    |
| `template`   | ルート、`docs/`、または`.github/` ディレクトリの`PULL_REQUEST_TEMPLATE`サブディレクトリからプル要求テンプレートを追加します。 | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&template=issue_template.md`           |

クエリ パラメーターを使用するには、同等のアクションを完了するためのアクセス許可が必要です。 たとえば、 `labels`を使用するラベルを追加する権限が必要です。 「[Organizationのリポジトリロール](/ja/enterprise-server@3.22/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization)」を参照してください。

クエリ パラメーターが無効であるか、アクセス許可が不十分な場合、 `404 Not Found` エラーが返されます。 サーバーの制限を超える URL は、 `414 URI Too Long` エラーを返します。