# 3.5.10. codebase_commit

resource type: codebase_commit
  Attributes:

    - commitid (integer) – the ID of this commit

    - codebaseid (integer) – the ID of the codebase that this commit is associated with

    - author (string) – the author of the commit

    - committer? (string) – the committer of the commit

    - comments (string) – comment associated with the commit. Usually this is the commit message.

    - when_timestamp (integer) – time of the commit

    - revision (string) – the commit revision identifier in the underlying version control system

    - parent_commitid? (integer) – the ID of the parent commit. Commits form a chain from older to newer commits. Merging is not supported in this representation of the codebase.

A commit represents a certain version of code in a codebase.

## 3.5.10.1. Update Methods

All update methods are available as attributes of `master.data.updates`.

class buildbot.data.codebases.CodebaseCommit
  add_commit(*, codebaseid, author, committer, files, comments, when_timestamp, revision, parent_commitid)
    Parameters:

      - codebaseid (int) – the ID of the codebase to associate commit with

      - author (str) – author associated with the commit

      - committer (str) – optional committer associated with the commit

      - files (list[str]) – optional list of file paths updated in the commit

      - comments (str) – any comments associated with the commit

      - when_timestamp (int) – the time when the commit happened

      - revision (str) – the ID of the commit in the version control system

      - parent_commitid (int) – optional ID of the parent commit

    Returns:

      None via Deferred.

    Creates a new commit.