summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-11-26 19:41:59 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2026-11-27 22:28:01 +0100
commit06afc252debb820b7a7b3e0fee48c8743bb80583 (patch)
tree7cbe69bf3571920bc1c97c571258f1880ce8334e
parentc5f4e01a84ee7e348bcde3dc3313c198d1197aa1 (diff)
Rename YAML fields for 'push' to be more consistent with 'publish'
-rw-r--r--src/Config.hs4
-rw-r--r--test/asset/publish/push.yaml8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Config.hs b/src/Config.hs
index 885e9a8..bf026ff 100644
--- a/src/Config.hs
+++ b/src/Config.hs
@@ -169,13 +169,13 @@ parsePublish ownName = withSeq "Publish list" $ mapM $
parsePush :: Node Pos -> Parser [ JobPush Declared ]
parsePush = withSeq "Push list" $ mapM $
withMap "Push specification" $ \m -> do
- source <- m .: "source"
+ source <- m .: "commit"
jpushSource <- case T.split (== '.') source of
[ repo, sel ]
| sel == "commit"
-> return $ currentCommitExpr (RepoName repo)
_ -> mzero
- destination <- m .: "destination"
+ destination <- m .: "to"
jpushDestination <- case T.split (== '.') destination of
[ repo, sel ]
| [ fn, bname, fn' ] <- T.split (== '"') sel
diff --git a/test/asset/publish/push.yaml b/test/asset/publish/push.yaml
index 8178226..b99cb9b 100644
--- a/test/asset/publish/push.yaml
+++ b/test/asset/publish/push.yaml
@@ -9,10 +9,10 @@ repo target_repo_ro:
job push_job:
push:
- - source: source_repo.commit
- destination: target_repo.branch("master")
+ - commit: source_repo.commit
+ to: target_repo.branch("master")
job push_job_ro:
push:
- - source: source_repo.commit
- destination: target_repo_ro.branch("master")
+ - commit: source_repo.commit
+ to: target_repo_ro.branch("master")