データ パイプライン エクスポート スキーマ

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

This page describes the structure and data schema of the Bitbucket data export files.

データ パイプラインを設定して構成する方法に関する詳細については、「データ パイプライン」をご参照ください。

出力ファイルの形式と構造

CSV 形式で書き込まれている出力ファイルは、RFC 4180 に準拠しています。これらのファイルには次のような特徴があります。

  • 各ファイルにはヘッダーがあります。これには結果的にデータのないエクスポートからのファイルも含まれます。
  • 改行は CRLF 文字 \r\n で区切られます。
  • 改行 (CRLF)、二重引用符、およびカンマを含むフィールドは、二重引用符で囲まれます。
  • フィールド内に二重引用符がある場合、フィールド内で使用される二重引用符の前には別の二重引用符を付けてエスケープします ( "aaa""b""bb""ccc" など)。
  • CSV エクスポートでは、データのない (Null 値) フィールドは 2 つの連続した区切り文字で表されます (例: ,,)。
  • 組み込まれた改行はデフォルトでエスケープされて、n として印刷されます。 

可用性

The data exported depends on your Bitbucket version. 

Required Bitbucket version...
Bitbucket version
リポジトリ7.13
変更を確認できる「コミット」7.13
プル リクエスト7.13
Pull request activities7.15
ユーザー7.13

個々のフィールドは、以下の表で特に明記されていない限り、すべてのスキーマ バージョンで利用できます。

On this page:

ユーザー ファイル

フィールド説明
user_id

タイプ: 文字列

説明: ユーザーの ID

例: 2853030

instance_url

タイプ: URL

説明: 現在のインスタンスのベース URL

例: https://yoursitename.com

user_name

タイプ: 文字列

説明: ユーザーのユーザー名

例: jsmith

user_fullname

タイプ: 文字列

説明: ユーザーの氏名。

例: John Smith

user_email

タイプ: メール

Description: Email address of the user.

例: jsmith@example.com

Repositories file

フィールド説明

repository_id

タイプ: 数値

Description: Unique identifier for the repository.

例: 23

instance_url

タイプ: URL

説明: 現在のインスタンスのベース URL。

例: https://yoursitename.com

url

タイプ: 文字列

Description: URL of the repository.

例: http://yoursitename.com/projects/SAM/repos/sample-repo

repository_name

タイプ: 文字列

Description: Name of the repository.

例: Sample repo

description

タイプ: 文字列

Description: Description of the repository.

hierarchy_id

タイプ: 数値

Description: The unique identifier for the hierarchy of forks to which this repository belongs. All repositories have a hierarchy ID, even if they have no forks.

例: d536510043f3b4bb4f77

origin

タイプ: 文字列

Description: Repository from which this repository was forked, if any.

例: SAMPLE/my-fork

project_id

タイプ: 数値

Description: Unique identifier for the project.

例: 19

project_key

タイプ: 文字列

Description: Key of the project this repo is contained in.

例: SAM

project_name

タイプ: 文字列

Description: Name of the project this repo is contained in.

例: Sample Project

project_type

タイプ: 文字列

Description: Whether the project the repository is contained in is normal or personal.

例: Personal

forkable

タイプ: ブール

Description: ‘Allow forks’ is selected in the repository settings.

例: True

fork

タイプ: ブール

Description: Repository is forked from another repository.

例: False

public

タイプ: ブール

Description: Whether ‘Public access’ is enabled in the repository settings.

例: False

Commits file

フィールド説明

commit_hash

タイプ: 文字列

Description: Unique identifier of the commit.

例: fc57795ddd877f00e51ab9f51a929220b1a5337b

instance_url

タイプ: URL

説明: 現在のインスタンスのベース URL。

例: https://yoursitename.com

url

タイプ: URL

Description: URL of the commit.

Example: https://yoursitename.com/projects/SAM/repos/sample-repo/commits/fc57795ddd877f00e51ab9f51a929220b1a5337b

commit_message

タイプ: 文字列

Description: Commit message included with the commit.

repository_id

タイプ: 数値

Description: Unique identifier for the repository.

例: 23

author_email

タイプ: 文字列

Description: Email address of the author of the committed code. If the author is not a Bitbucket user, this email will not map to a user in the users table.

例: jsmith@example.com

authored_date

タイプ: 日付

Description: Date and time the commit was made.

例: 2021-02-04 00:43

committer_email

タイプ: 文字列

Description: Email address of the user who committed the code. If the committer is not a Bitbucket user, this email will not map to a user in the users table.

例: jsmith@example.com

committed_date

タイプ: 日付

Description: Date and time the commit was last modified.

例: 2021-02-04 00:43

Pull requests file

フィールド説明

pull_request_id

タイプ: 文字列

Description: Unique identifier of the pull request. It is a combination to_repository_id & scoped_id.

例: 23-16

scoped_id

タイプ: 数値

Description: Identifier for the pull request. This ID is only unique within each repository.

例: 16

instance_url

タイプ: URL

説明: 現在のインスタンスのベース URL。

例: https://yoursitename.com

url

タイプ: 文字列

Description: URL of the pull request.

Example: http://yoursitename.com/projects/SAM/repos/sample-repo/pull-requests/132/

title

タイプ: 文字列

Description: Title of the pull request.

Example: TEST-123 fix broken tests

description

タイプ: 文字列

Description: Description included with the pull request, limited to XXX characters.

author_id

タイプ: 数値

Description: Unique identifier of the person who created the pull request.

例: 2853030

created_date

タイプ: 日付

Description: Date the pull request was created.

例: 2021-01-03 20:57

updated_date

タイプ: 日付

Description: Date the pull request was updated.

例: 2021-01-03 23:06

closed_date

タイプ: 日付

Description: Date the pull request was closed.

例: 2021-01-03 23:06

from_branch_name

タイプ: 文字列

Description: The name of the source branch.

Example: Improve-tests

from_commit_hash

タイプ: 文字列

Description: The commit hash for the earliest commit in this pull request.

例: c149b9a3a37fd211613aaf9390866d1778172a07

from_repository
_id

タイプ: 数値

Description: Unique identifier for the source repository.

例: 16

to_branch_name

タイプ: 文字列

Description: The name of the destination branch.

例: Master

to_commit_hash

タイプ: 文字列

Description: The commit hash for the latest commit in this pull request.

例: d149b9a3a37fd211613aaf9390866d1778172a56

to_repository_id

タイプ: 数値

Description: Unique identifier for the destination repository.

例: 23

version

タイプ: 数値

Description: Version number represents the number of times the pull request has been updated.

例: 3

state

タイプ: 文字列

Description: Current status of the pull request. Can be MERGED, DECLINED, or OPEN.

例: MERGED

participant_count

タイプ: 数値

Description: Number of participants on the pull request.

reviewer_count

タイプ: 数値

Description: Number of reviewers on the pull request.

approvals_count

タイプ: 数値

Description: Number of approvals on the pull request.

comments_count

タイプ: 数値

Description: Number of comments on the pull request.

tasks_count

タイプ: 数値

Description: Total number of tasks on the pull request.

resolved_tasks_
count

タイプ: 数値

Description: Number of tasks resolved on the pull request.

time_to_merge

タイプ: 数値

Description: Time between pull request creation and merge, in milliseconds.

例: 24800

Pull request activity file

The historical activity for each pull request will be exported to pull_request_activities CSV file.  Only activity after the export fromDate will be included.

Use the pull_request_id field to join this table to the pull requests table.

フィールド説明

pull_request_id

タイプ: 文字列

Description: Unique identifier of the pull request. It is a combination to_repository_id & scoped_id.

例: 23-16

author_id

タイプ: 数値

Description: Unique identifier of the person who created the pull request.

例: 2853030

created_date

タイプ: 日付

Description: Date the action performed on the pull request.

例: 2021-01-03 20:57

action

タイプ: 文字列

Description: The action performed on the pull request, for example created, updated, reviewed, commented, declined, approved, and merged.

例: MERGED

additional_information

タイプ: 文字列

説明: 変更に関連する追加情報 (JSON 形式)。

例:

{"comment_id":59,"
"comment_action":"EDITED",
"author_id":2,
"severity":"BLOCKER",
"state":"RESOLVED",
"text":"sample comment",
"thread":39,
"resolved_date":"2021-06-14T13:08:10Z"}

There are some situations where the created date and user ID may be incorrect in the pull request activities file. This is due to a historical issue, that was resolved in Bitbucket 7.14. For comments edited before the fix, the original created date and user ID was returned in the export, rather than the edited date and user ID.


Build status file (optional)

Exporting build statuses can take a significant amount of time depending on the number of build statuses that might be associated with a commit. For this reason, exporting this data is disabled by default. Set the plugin.data.pipeline.bitbucket.export.build.statuses system property to true to enable it.
フィールド説明

commit_hash

タイプ: 文字列

Description: Commit hash for the commit.

例: fc57795ddd877f00e51ab9f51a929220b1a5337b

repository_id

タイプ: 数値

Description: Unique identifier of the repository.

例: 23

build_key

タイプ: 文字列

Description: Key set in your CI tool. Can be used as a unique identifier when combined with repository ID and commit ID.

例: SAMPLE-PLAN123

build_url

タイプ: 文字列

Description: URL of the build in your CI tool.

Example: https://bamboo.example.com/browse/SAMPLE-PLAN123-8

build_name

タイプ: 文字列

Description: Name of the build.

Example: Pre-release build

build_number

タイプ: 数値

Description: The identifier for the specific run that resulted in this build status. May be empty.

例: 8

build_description

タイプ: 文字列

Description: Description of the specific run that resulted in this build status.

例: #8 successful\nin 7 minutes

build_duration

タイプ: 数値

Description: Duration of the build, in milliseconds.

Example: 230400

build_created_date

タイプ: 日付

Description: Date the build was created.

例: 2021-01-27 22:55

build_updated_date

タイプ: 日付

Description: Date the build was updated.

例: 2021-01-27 22:55

build_state

タイプ: 文字列

Description: State of the build. Can include SUCCESSFUL / FAILED / INPROGRESS

例: SUCCESSFUL

build_parent

タイプ: 文字列

Description: Key of the parent build for this plan. Can be empty.

Example: PLAN

build_ref

タイプ: 文字列

Description: The branch or tag that this build is associated with. Can be empty.

build_successful_
tests

タイプ: 数値

Description: The number of successful tests in this build.

build_failed_tests

タイプ: 数値

Description: The number of failed tests in this build.

build_skipped_tests

タイプ: 数値

Description: The number of skipped tests in this build.

Last modified on Mar 2, 2022

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.