mirror of
https://github.com/peridotbuild/peridot.git
synced 2024-12-22 10:38:28 +00:00
Add commit_uri and commit_hash to Entry
This commit is contained in:
parent
4430fb562d
commit
3a417acff0
@ -27,13 +27,15 @@ type Entry struct {
|
|||||||
|
|
||||||
Name string `db:"name"`
|
Name string `db:"name"`
|
||||||
EntryID string `db:"entry_id"`
|
EntryID string `db:"entry_id"`
|
||||||
CreateTime time.Time `db:"create_time"`
|
CreateTime time.Time `db:"create_time" pika:"omitempty"`
|
||||||
OSRelease string `db:"os_release"`
|
OSRelease string `db:"os_release"`
|
||||||
Sha256Sum string `db:"sha256_sum"`
|
Sha256Sum string `db:"sha256_sum"`
|
||||||
RepositoryName string `db:"repository_name"`
|
RepositoryName string `db:"repository_name"`
|
||||||
WorkerID sql.NullString `db:"worker_id"`
|
WorkerID sql.NullString `db:"worker_id"`
|
||||||
BatchName sql.NullString `db:"batch_name"`
|
BatchName sql.NullString `db:"batch_name"`
|
||||||
UserEmail sql.NullString `db:"user_email"`
|
UserEmail sql.NullString `db:"user_email"`
|
||||||
|
CommitURI string `db:"commit_uri"`
|
||||||
|
CommitHash string `db:"commit_hash"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Entry) GetID() string {
|
func (e *Entry) GetID() string {
|
||||||
@ -47,8 +49,11 @@ func (e *Entry) ToPB() *mothershippb.Entry {
|
|||||||
CreateTime: timestamppb.New(e.CreateTime),
|
CreateTime: timestamppb.New(e.CreateTime),
|
||||||
OsRelease: e.OSRelease,
|
OsRelease: e.OSRelease,
|
||||||
Sha256Sum: e.Sha256Sum,
|
Sha256Sum: e.Sha256Sum,
|
||||||
|
Repository: e.RepositoryName,
|
||||||
WorkerId: base.SqlNullString(e.WorkerID),
|
WorkerId: base.SqlNullString(e.WorkerID),
|
||||||
Batch: base.SqlNullString(e.BatchName),
|
Batch: base.SqlNullString(e.BatchName),
|
||||||
UserEmail: base.SqlNullString(e.UserEmail),
|
UserEmail: base.SqlNullString(e.UserEmail),
|
||||||
|
CommitUri: e.CommitURI,
|
||||||
|
CommitHash: e.CommitHash,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,9 @@ CREATE TABLE entries
|
|||||||
repository_name VARCHAR(255) NOT NULL,
|
repository_name VARCHAR(255) NOT NULL,
|
||||||
worker_id VARCHAR(255) REFERENCES workers (worker_id),
|
worker_id VARCHAR(255) REFERENCES workers (worker_id),
|
||||||
batch_name VARCHAR(255),
|
batch_name VARCHAR(255),
|
||||||
user_email TEXT
|
user_email TEXT,
|
||||||
|
commit_uri TEXT NOT NULL,
|
||||||
|
commit_hash TEXT NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE batches
|
CREATE TABLE batches
|
||||||
|
@ -70,4 +70,10 @@ message Entry {
|
|||||||
// If this field is not set, the package was archived by a
|
// If this field is not set, the package was archived by a
|
||||||
// worker instead of a user.
|
// worker instead of a user.
|
||||||
google.protobuf.StringValue user_email = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
google.protobuf.StringValue user_email = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||||
|
|
||||||
|
// URI to view commit
|
||||||
|
string commit_uri = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||||
|
|
||||||
|
// Commit hash of the resulting import
|
||||||
|
string commit_hash = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user