doc/proposal: add CommitSHA field to Lock type

This commit is contained in:
Taylor Blau 2016-05-17 12:10:36 -06:00
parent 946e4a5d55
commit e4d837e4a0
2 changed files with 7 additions and 0 deletions

@ -136,6 +136,10 @@ type Lock struct {
Name string `json:"name"` Name string `json:"name"`
Email string `json:"email"` Email string `json:"email"`
} `json:"creator"` } `json:"creator"`
// CommitSHA is the commit that this Lock was created against. It is
// strictly equal to the SHA of the minimum commit negotiated in order
// to create this lock.
CommitSHA string `json:"commit_sha"
// LockedAt is a required parameter that represents the instant in time // LockedAt is a required parameter that represents the instant in time
// that this lock was created. For most server implementations, this // that this lock was created. For most server implementations, this
// should be set to the instant at which the lock was initially // should be set to the instant at which the lock was initially

@ -40,6 +40,7 @@
< name: "Jane Doe", < name: "Jane Doe",
< email: "jane@example.com" < email: "jane@example.com"
< }, < },
< commit_sha: "d3adbeef",
< locked_at: "2016-05-17T15:49:06+00:00", < locked_at: "2016-05-17T15:49:06+00:00",
< } < }
< } < }
@ -107,6 +108,7 @@
< name: "Jane Doe", < name: "Jane Doe",
< email: "jane@example.com" < email: "jane@example.com"
< }, < },
< commit_sha: "d3adbeef",
< locked_at: "2016-05-17T15:49:06+00:00", < locked_at: "2016-05-17T15:49:06+00:00",
< unlocked_at: "2016-05-17T15:49:06+00:00" < unlocked_at: "2016-05-17T15:49:06+00:00"
< } < }
@ -157,6 +159,7 @@ Note: no matching locks yields a payload of `locks: []`, and a status of 200.
< name: "Jane Doe", < name: "Jane Doe",
< email: "jane@example.com" < email: "jane@example.com"
< }, < },
< commit_sha: "1ec245f",
< locked_at: "2016-05-17T15:49:06+00:00" < locked_at: "2016-05-17T15:49:06+00:00"
< } < }
< ], < ],