diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2025-04-12 15:16:30 +0200 | 
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-04-12 21:04:14 +0200 | 
| commit | a8f1e216681a1f03e15b8b71d1f83f7aa3493617 (patch) | |
| tree | d76481ca10a6d780d527bd16755dbcd7cf739190 /src/Job | |
| parent | d6c4daa2fb0b7f8dd0afb3ef50b2b85106bfd2ac (diff) | |
Track other used repos in job ID
Diffstat (limited to 'src/Job')
| -rw-r--r-- | src/Job/Types.hs | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/src/Job/Types.hs b/src/Job/Types.hs index 19cf560..b5d05fb 100644 --- a/src/Job/Types.hs +++ b/src/Job/Types.hs @@ -17,7 +17,7 @@ data Job' d = Job      { jobId :: JobId' d      , jobName :: JobName      , jobContainingCheckout :: [ JobCheckout ] -    , jobOtherCheckout :: [ ( JobRepo d, Maybe Text, JobCheckout ) ] +    , jobOtherCheckout :: [ ( JobRepo d, JobCheckout ) ]      , jobRecipe :: [ CreateProcess ]      , jobArtifacts :: [ ( ArtifactName, Pattern ) ]      , jobUses :: [ ( JobName, ArtifactName ) ] @@ -41,8 +41,8 @@ textJobName (JobName name) = name  type family JobRepo d :: Type where -    JobRepo Declared = RepoName -    JobRepo Evaluated = Repo +    JobRepo Declared = ( RepoName, Maybe Text ) +    JobRepo Evaluated = Tree  data JobCheckout = JobCheckout      { jcSubtree :: Maybe FilePath @@ -71,8 +71,8 @@ newtype JobId = JobId [ JobIdPart ]  data JobIdPart      = JobIdName JobName -    | JobIdCommit CommitId -    | JobIdTree TreeId +    | JobIdCommit (Maybe RepoName) CommitId +    | JobIdTree (Maybe RepoName) TreeId      deriving (Eq, Ord)  newtype JobRef = JobRef [ Text ] @@ -81,8 +81,8 @@ newtype JobRef = JobRef [ Text ]  textJobIdPart :: JobIdPart -> Text  textJobIdPart = \case      JobIdName name -> textJobName name -    JobIdCommit cid -> textCommitId cid -    JobIdTree tid -> textTreeId tid +    JobIdCommit _ cid -> textCommitId cid +    JobIdTree _ tid -> textTreeId tid  textJobId :: JobId -> Text  textJobId (JobId ids) = T.intercalate "." $ map textJobIdPart ids |