Skip to content

Commit

Permalink
Use KSUID for prefixed identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Sep 30, 2023
1 parent c58b8fa commit 7008ec6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion server/Tingle.Dependabot/AppSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static async Task SetupAsync(WebApplication app, CancellationToken cancel
{
project = new Models.Management.Project
{
Id = $"prj_{Guid.NewGuid():n}",
Id = $"prj_{KSUID.Ksuid.Generate()}",
Created = DateTimeOffset.UtcNow,
Password = GeneratePassword(32),
Url = setup.Url.ToString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public async Task ConsumeAsync(EventContext<TriggerUpdateJobsEvent> context, Can
// create the job
job = new UpdateJob
{
Id = FlakeId.Id.Create().ToString(),
Id = $"job_{KSUID.Ksuid.Generate()}",

Created = DateTimeOffset.UtcNow,
Status = UpdateJobStatus.Scheduled,
Expand Down
4 changes: 2 additions & 2 deletions server/Tingle.Dependabot/Tingle.Dependabot.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<Deterministic>true</Deterministic>
Expand All @@ -23,7 +23,7 @@
<PackageReference Include="Azure.Monitor.Query" Version="1.2.0" />
<PackageReference Include="Azure.ResourceManager.AppContainers" Version="1.1.0" />
<PackageReference Include="DistributedLock.FileSystem" Version="1.0.1" />
<PackageReference Include="FlakeId" Version="1.1.2" /> <!-- TODO: replace with Tingle.Extensions.Primitives -->
<PackageReference Include="Ksuid" Version="1.0.0" /> <!-- TODO: replace with Tingle.Extensions.Primitives -->
<PackageReference Include="Macross.Json.Extensions" Version="3.0.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.11" />
Expand Down
2 changes: 1 addition & 1 deletion server/Tingle.Dependabot/Workflow/Synchronizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ internal async Task SynchronizeAsync(Project project,
{
repository = new Repository
{
Id = $"repo_{Guid.NewGuid():n}",
Id = $"repo_{KSUID.Ksuid.Generate()}",
Created = DateTimeOffset.UtcNow,
ProjectId = project.Id,
ProviderId = providerInfo.Id,
Expand Down

0 comments on commit 7008ec6

Please sign in to comment.