collab: Require github_user_created_at at ingress points (#17180)

This PR makes the `github_user_created_at` field required at ingress
points into collab.

In practice we already have this value passed up, this change just makes
that explicit.

This is a precursor to making it required in the database.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2024-08-30 17:09:59 -04:00
committed by GitHub
parent 9a8c301a7d
commit bb9f2f8713
9 changed files with 26 additions and 26 deletions
@@ -25,7 +25,7 @@ async fn test_contributors(db: &Arc<Database>) {
assert_eq!(db.get_contributors().await.unwrap(), Vec::<String>::new());
let user1_created_at = Utc::now();
db.add_contributor("user1", 1, None, Some(user1_created_at), None)
db.add_contributor("user1", 1, None, user1_created_at, None)
.await
.unwrap();
assert_eq!(
@@ -34,7 +34,7 @@ async fn test_contributors(db: &Arc<Database>) {
);
let user2_created_at = Utc::now();
db.add_contributor("user2", 2, None, Some(user2_created_at), None)
db.add_contributor("user2", 2, None, user2_created_at, None)
.await
.unwrap();
assert_eq!(
+2 -2
View File
@@ -101,7 +101,7 @@ async fn test_get_or_create_user_by_github_account(db: &Arc<Database>) {
.user_id;
let user = db
.get_or_create_user_by_github_account("the-new-login2", 102, None, Some(Utc::now()), None)
.get_or_create_user_by_github_account("the-new-login2", 102, None, Utc::now(), None)
.await
.unwrap();
assert_eq!(user.id, user_id2);
@@ -113,7 +113,7 @@ async fn test_get_or_create_user_by_github_account(db: &Arc<Database>) {
"login3",
103,
Some("user3@example.com"),
Some(Utc::now()),
Utc::now(),
None,
)
.await