Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions dsl/extdeps/git/git.dag
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ service git.Core {
}
}

operation HeadCommit {
input {}
output {
sha: CommitSha from "stdout"
success: Bool from "exit_success"
}
readonly
transport shell { argv: ["git", "rev-parse", "HEAD"] }
exit {
0 => Unit
128 => String "Not a git repository"
}
}

operation RemoteBranches {
input {}
output { branches: List<String> from "stdout_lines" }
Expand Down
6 changes: 3 additions & 3 deletions dsl/gunbc/tools/roadmap_spawn_request.dag
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module gunbc.tools.roadmap_spawn_request

import extdeps.shell
import extdeps.git
import gunbc.roadmap_spawner { roadmap_spawn_request_json }
import gunbc.roadmap_authority { roadmap_authority, authored_merged_prs }

func roadmap_next_spawnable() -> String {
let sha_result = shell.Exec.Run(script: "git rev-parse HEAD 2>/dev/null | tr -d '\\n'")
let sha_result = git.Core.HeadCommit()
if sha_result.success {
roadmap_spawn_request_json(doc: roadmap_authority(), merged: authored_merged_prs(), anchor_commit: sha_result.stdout)
roadmap_spawn_request_json(doc: roadmap_authority(), merged: authored_merged_prs(), anchor_commit: sha_result.sha)
} else {
"{\"schema\": \"roadmap-spawn-request/v1\", \"error\": \"anchor_commit unavailable: git rev-parse HEAD failed\", \"ready\": []}"
}
Expand Down
1 change: 0 additions & 1 deletion src/v2/lens/medium_structure_containment.dag
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ data medium_structure_exception_roster: List<String> = [
"dsl/tools/emit_host_transport.dag",
"dsl/gunbc/assimilate/bmc_token_federation.dag",
"dsl/gunbc/tools/review.dag",
"dsl/gunbc/tools/roadmap_spawn_request.dag",
"dsl/test/claim/fleet_converge_emit_test.dag",

"dsl/test/claim/srv3_os_install_emit_test.dag",
Expand Down
Loading