code: def test_commit_title():
      t = CommitTitle.parse(
          "ARROW-9598: [C++][Parquet] Fix writing nullable structs"
      )
      assert t.project == "ARROW"
      assert t.issue == "ARROW-9598"
      assert t.components == ["C++", "Parquet"]
      assert t.summary == "Fix writing nullable structs"
      assert t.minor is False
  
      t = CommitTitle.parse(
          "ARROW-8002: [C++][Dataset][R] Support partitioned dataset writing"
      )
      assert t.project == "ARROW"
      assert t.issue == "ARROW-8002"
      assert t.components == ["C++", "Dataset", "R"]
      assert t.summary == "Support partitioned dataset writing"
      assert t.minor is False
  
      t = CommitTitle.parse(
          "ARROW-9600: [Rust][Arrow] pin older version of proc-macro2 during "
          "build"
      )
      assert t.project == "ARROW"
      assert t.issue == "ARROW-9600"
      assert t.components == ["Rust", "Arrow"]
      assert (
          t.summary == "pin older version of proc-macro2 during build"
      )
      assert t.minor is False
  
      t = CommitTitle.parse("[Release] Update versions for 1.0.0")
      assert t.project is None
      assert t.issue is None
      assert t.components == ["Release"]
      assert t.summary == "Update versions for 1.0.0"
      assert t.minor is False
  
      t = CommitTitle.parse(
          "MINOR: [Release] Update versions for 1.0.0"
      )
      assert t.project is None
      assert t.issue is None
      assert t.components == ["Release"]
      assert t.summary == "Update versions for 1.0.0"
      assert t.minor is True
  
      t = CommitTitle.parse(
          "[Python][Doc] Fix rst role dataset.rst (#7725)"
      )
      assert t.project is None
      assert t.issue is None
      assert t.components == ["Python", "Doc"]
      assert t.summary == "Fix rst role dataset.rst (#7725)"
      assert t.minor is False
  
      t = CommitTitle.parse(
          "PARQUET-1882: [C++] Buffered Reads should allow for 0 length"
      )
      assert t.project == "PARQUET"
      assert t.issue == "PARQUET-1882"
      assert t.components == ["C++"]
      assert t.summary == "Buffered Reads should allow for 0 length"
      assert t.minor is False
  
      t = CommitTitle.parse(
          "ARROW-9340 [R] Use CRAN version of decor package "
          "\nsomething else\n"
          "\nwhich should be truncated"
      )
      assert t.project == "ARROW"
      assert t.issue == "ARROW-9340"
      assert t.components == ["R"]
      assert t.summary == "Use CRAN version of decor package "
      assert t.minor is False
  
file_path: arrow/dev/archery/archery/release/tests/test_release.py
imports: import pytest
  from archery.release.core import Release, MajorRelease, MinorRelease, PatchRelease, IssueTracker, Version, Issue, CommitTitle, Commit
  from archery.testing import DotDict
label_desc: Use image node_id 4 for calling a global function with example usage: test_commit_title() without return types