ドキュメントには頻繁に更新が加えられ、その都度公開されています。本ページの翻訳はまだ未完成な部分があることをご了承ください。最新の情報については、英語のドキュメンテーションをご参照ください。本ページの翻訳に問題がある場合はこちらまでご連絡ください。

インタラクション

ここには以下の内容があります:

Did this doc help you?

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

OR, learn how to contribute.

リポジトリに対するインタラクションには、コミット、Issueのオープン、プルリクエストの作成があります。 インタラクションAPIを使用すると、オーナーまたは管理者アクセス権のあるユーザは特定のユーザによるパブリックリポジトリの操作を一時的に制限することができます。

Organization

OrganizationのインタラクションAPIを使用すると、OrganizationのオーナーはOrganizationのパブリックリポジトリでコメント、Issueのオープン、プルリクエストの作成ができるユーザを一時的に制限することができます。 When restrictions are enabled, only the specified group of GitHub users will be able to participate in interactions. Restrictions expire 24 hours from the time they are set. GitHub ユーザのグループについては以下を参照してください。

  • OrganizationのExisting users: When you limit interactions to existing_users, new users with accounts less than 24 hours old who have not previously contributed and are not collaborators will be temporarily restricted

  • OrganizationのContributors only: When you limit interactions to contributors_only, users who have not previously contributed and are not collaborators will be temporarily restricted

  • OrganizationのCollaborators only: When you limit interactions to collaborators_only, users who are not collaborators will be temporarily restricted

    Get interaction restrictions for an organization

    Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response.

    get /orgs/{org}/interaction-limits

    パラメータ

    Name Type In Description
    accept string header

    This API is under preview and subject to change. プレビューの通知を見る

    org string path

    コードサンプル

    Shell
    curl \
      -H "Accept: application/vnd.github.sombra-preview+json" \
      https://api.github.com/orgs/ORG/interaction-limits
    
    JavaScript (@octokit/core.js)
    await octokit.request('GET /orgs/{org}/interaction-limits', {
      org: 'org',
      mediaType: {
        previews: [
          'sombra'
        ]
      }
    })
    

    Default response

    Status: 200 OK
    {
      "limit": "collaborators_only",
      "origin": "organization",
      "expires_at": "2018-08-17T04:18:39Z"
    }
    

    Notes

    プレビュー通知

    The Interactions API is currently in public preview. See the blog post preview for more details. To access the API during the preview period, you must provide a custom media type in the Accept header:

    application/vnd.github.sombra-preview
    
    ☝️ このヘッダは必須です.

    Set interaction restrictions for an organization

    Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions.

    put /orgs/{org}/interaction-limits

    パラメータ

    Name Type In Description
    accept string header

    This API is under preview and subject to change. プレビューの通知を見る

    org string path
    limit string body

    Required. Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: existing_users, contributors_only, or collaborators_only.

    コードサンプル

    Shell
    curl \
      -X PUT \
      -H "Accept: application/vnd.github.sombra-preview+json" \
      https://api.github.com/orgs/ORG/interaction-limits \
      -d '{"limit":"limit"}'
    
    JavaScript (@octokit/core.js)
    await octokit.request('PUT /orgs/{org}/interaction-limits', {
      org: 'org',
      limit: 'limit',
      mediaType: {
        previews: [
          'sombra'
        ]
      }
    })
    

    Default response

    Status: 200 OK
    {
      "limit": "collaborators_only",
      "origin": "organization",
      "expires_at": "2018-08-17T04:18:39Z"
    }
    

    Validation failed

    Status: 422 Unprocessable Entity

    Notes

    プレビュー通知

    The Interactions API is currently in public preview. See the blog post preview for more details. To access the API during the preview period, you must provide a custom media type in the Accept header:

    application/vnd.github.sombra-preview
    
    ☝️ このヘッダは必須です.

    Remove interaction restrictions for an organization

    Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.

    delete /orgs/{org}/interaction-limits

    パラメータ

    Name Type In Description
    accept string header

    This API is under preview and subject to change. プレビューの通知を見る

    org string path

    コードサンプル

    Shell
    curl \
      -X DELETE \
      -H "Accept: application/vnd.github.sombra-preview+json" \
      https://api.github.com/orgs/ORG/interaction-limits
    
    JavaScript (@octokit/core.js)
    await octokit.request('DELETE /orgs/{org}/interaction-limits', {
      org: 'org',
      mediaType: {
        previews: [
          'sombra'
        ]
      }
    })
    

    Default Response

    Status: 204 No Content

    Notes

    プレビュー通知

    The Interactions API is currently in public preview. See the blog post preview for more details. To access the API during the preview period, you must provide a custom media type in the Accept header:

    application/vnd.github.sombra-preview
    
    ☝️ このヘッダは必須です.

Repository

リポジトリのインタラクションAPIを使用すると、オーナーまたは管理者アクセス権のあるユーザはパブリックリポジトリでコメント、Issueのオープン、プルリクエストの作成ができるユーザを一時的に制限することができます。 When restrictions are enabled, only the specified group of GitHub users will be able to participate in interactions. Restrictions expire 24 hours from the time they are set. GitHub ユーザのグループについては以下を参照してください。

  • Existing users: When you limit interactions to existing_users, new users with accounts less than 24 hours old who have not previously contributed and are not collaborators will be temporarily restricted in the repository.
  • Contributors only: When you limit interactions to contributors_only, users who have not previously contributed and are not collaborators will be temporarily restricted in the repository.
  • Collaborators only: When you limit interactions to collaborators_only, users who are not collaborators will be temporarily restricted in the repository.

Get interaction restrictions for a repository

Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.

get /repos/{owner}/{repo}/interaction-limits

パラメータ

Name Type In Description
accept string header

This API is under preview and subject to change. プレビューの通知を見る

owner string path
repo string path

コードサンプル

Shell
curl \
  -H "Accept: application/vnd.github.sombra-preview+json" \
  https://api.github.com/repos/octocat/hello-world/interaction-limits
JavaScript (@octokit/core.js)
await octokit.request('GET /repos/{owner}/{repo}/interaction-limits', {
  owner: 'octocat',
  repo: 'hello-world',
  mediaType: {
    previews: [
      'sombra'
    ]
  }
})

Default response

Status: 200 OK
{
  "limit": "collaborators_only",
  "origin": "repository",
  "expires_at": "2018-08-17T04:18:39Z"
}

Notes

プレビュー通知

The Interactions API is currently in public preview. See the blog post preview for more details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.sombra-preview
☝️ このヘッダは必須です.

Set interaction restrictions for a repository

Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions.

put /repos/{owner}/{repo}/interaction-limits

パラメータ

Name Type In Description
accept string header

This API is under preview and subject to change. プレビューの通知を見る

owner string path
repo string path
limit string body

Required. Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: existing_users, contributors_only, or collaborators_only.

コードサンプル

Shell
curl \
  -X PUT \
  -H "Accept: application/vnd.github.sombra-preview+json" \
  https://api.github.com/repos/octocat/hello-world/interaction-limits \
  -d '{"limit":"limit"}'
JavaScript (@octokit/core.js)
await octokit.request('PUT /repos/{owner}/{repo}/interaction-limits', {
  owner: 'octocat',
  repo: 'hello-world',
  limit: 'limit',
  mediaType: {
    previews: [
      'sombra'
    ]
  }
})

Default response

Status: 200 OK
{
  "limit": "collaborators_only",
  "origin": "repository",
  "expires_at": "2018-08-17T04:18:39Z"
}

Notes

プレビュー通知

The Interactions API is currently in public preview. See the blog post preview for more details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.sombra-preview
☝️ このヘッダは必須です.

Remove interaction restrictions for a repository

Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions.

delete /repos/{owner}/{repo}/interaction-limits

パラメータ

Name Type In Description
accept string header

This API is under preview and subject to change. プレビューの通知を見る

owner string path
repo string path

コードサンプル

Shell
curl \
  -X DELETE \
  -H "Accept: application/vnd.github.sombra-preview+json" \
  https://api.github.com/repos/octocat/hello-world/interaction-limits
JavaScript (@octokit/core.js)
await octokit.request('DELETE /repos/{owner}/{repo}/interaction-limits', {
  owner: 'octocat',
  repo: 'hello-world',
  mediaType: {
    previews: [
      'sombra'
    ]
  }
})

Default Response

Status: 204 No Content

Notes

プレビュー通知

The Interactions API is currently in public preview. See the blog post preview for more details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.sombra-preview
☝️ このヘッダは必須です.

Did this doc help you?

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

OR, learn how to contribute.