@docupace/pipeline 1.0.39 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/commit-message ADDED
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env bash
2
+
3
+ TEMPERATURE=${TEMPERATURE:-1}
4
+ MAX_TOKENS=${MAX_TOKENS:-512}
5
+ MODEL=${MODEL:-"gemma3:27b"}
6
+ INTRO=${INTRO:-"Create a commit message, focusing on the files modified."}
7
+ OLLAMA_ENDPOINT=${OLLAMA_ENDPOINT:-"http://10.10.22.111:11434/v1/completions"}
8
+
9
+ # Get a list of staged files
10
+ changed_files=$(git diff --cached --name-only)
11
+ diff_messages=""
12
+
13
+ for file in $changed_files; do
14
+ diff_messages+="$(git diff --cached -- "$file")"
15
+ done
16
+
17
+ payload=$(jq -n \
18
+ --arg model "$MODEL" \
19
+ --arg prompt "$(
20
+ echo "$INTRO";
21
+ echo "$diff_messages"
22
+ )" \
23
+ --argjson temp "$TEMPERATURE" \
24
+ --argjson tokens "$MAX_TOKENS" \
25
+ '{
26
+ model: $model,
27
+ prompt: $prompt,
28
+ temperature: $temp,
29
+ max_tokens: $tokens
30
+ }'
31
+ )
32
+
33
+ response=$(curl -s -X POST "$OLLAMA_ENDPOINT" \
34
+ -H "Content-Type: application/json" \
35
+ -d "$payload")
36
+
37
+ echo "$payload" | jq . > /tmp/ollama-summary.json
38
+ echo "$response" | jq . >> /tmp/ollama-summary.json
39
+
40
+ echo "$response" | jq -r '.choices[0].text' | sed '/./,$!d'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env bash
2
+
3
+ TARGET_BRANCH="INFP-10599-create-new-build-agent-runner-in-uat"
4
+
5
+ TEMPERATURE=${TEMPERATURE:-1}
6
+ MAX_TOKENS=${MAX_TOKENS:-512}
7
+ MODEL=${MODEL:-"gemma3:27b"}
8
+ INTRO=${INTRO:-"Summarize the changes introduced in this commit message, focusing on the files modified."}
9
+ OLLAMA_ENDPOINT=${OLLAMA_ENDPOINT:-"http://10.10.22.111:11434/v1/completions"}
10
+
11
+ # Get a list of staged files
12
+ changed_files=$(git diff --cached --name-only)
13
+ diff_messages=""
14
+
15
+ for file in $changed_files; do
16
+ diff_messages+="$(git diff --cached -- "$file")"
17
+ done
18
+
19
+ payload=$(jq -n \
20
+ --arg model "$MODEL" \
21
+ --arg prompt "$(
22
+ echo "$INTRO";
23
+ echo "$diff_messages"
24
+ )" \
25
+ --argjson temp "$TEMPERATURE" \
26
+ --argjson tokens "$MAX_TOKENS" \
27
+ '{
28
+ model: $model,
29
+ prompt: $prompt,
30
+ temperature: $temp,
31
+ max_tokens: $tokens
32
+ }'
33
+ )
34
+
35
+ response=$(curl -s -X POST "$OLLAMA_ENDPOINT" \
36
+ -H "Content-Type: application/json" \
37
+ -d "$payload")
38
+
39
+ echo "$payload" | jq . > /tmp/ollama-summary.json
40
+ echo "$response" | jq . >> /tmp/ollama-summary.json
41
+
42
+ echo "$response" | jq -r '.choices[0].text' | sed '/./,$!d'
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env bash
2
+
3
+ TARGET_BRANCH=master
4
+
5
+ TEMPERATURE=${TEMPERATURE:-1}
6
+ MAX_TOKENS=${MAX_TOKENS:-512}
7
+ MODEL=${MODEL:-"gemma3:27b"}
8
+ INTRO=${INTRO:-"Write a summary of the commits in this pull request"}
9
+ OLLAMA_ENDPOINT=${OLLAMA_ENDPOINT:-"http://10.10.22.111:11434/v1/completions"}
10
+
11
+ payload=$(jq -n \
12
+ --arg model "$MODEL" \
13
+ --arg prompt "$(
14
+ echo "$INTRO";
15
+ git log origin/$TARGET_BRANCH --format='%B';
16
+ )" \
17
+ --argjson temp "$TEMPERATURE" \
18
+ --argjson tokens "$MAX_TOKENS" \
19
+ '{
20
+ model: $model,
21
+ prompt: $prompt,
22
+ temperature: $temp,
23
+ max_tokens: $tokens
24
+ }'
25
+ )
26
+
27
+ response=$(curl -s -X POST "$OLLAMA_ENDPOINT" \
28
+ -H "Content-Type: application/json" \
29
+ -d "$payload")
30
+
31
+ echo "$payload" | jq . > /tmp/ollama-summary.json
32
+ echo "$response" | jq . >> /tmp/ollama-summary.json
33
+
34
+ echo "$response" | jq -r '.choices[0].text' | sed '/./,$!d'
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+
4
+ TARGET_BRANCH=master
5
+ TEMPERATURE=${TEMPERATURE:-1}
6
+ MAX_TOKENS=${MAX_TOKENS:-512}
7
+ MODEL=${MODEL:-"gemma3:27b"}
8
+ INTRO=${INTRO:-"Below are some commit messages. Write a one sentence summary of them."}
9
+
10
+ LLM_ENDPOINT=${LLM_ENDPOINT:-"http://10.10.22.111:11434/v1/completions"} # Ollama or LocalAI
11
+
12
+ function num_commits {
13
+ git log origin/$TARGET_BRANCH --oneline | wc -l
14
+ }
15
+
16
+ function single_commit_title {
17
+ git log origin/$TARGET_BRANCH --format='%s' | head -1
18
+ }
19
+
20
+ function multi_commit_title {
21
+ prompt="$(
22
+ echo "$INTRO"
23
+ git log origin/$TARGET_BRANCH --format='%B'
24
+ )"
25
+
26
+ payload=$(jq -n \
27
+ --arg model "$MODEL" \
28
+ --arg prompt "$prompt" \
29
+ --argjson temp "$TEMPERATURE" \
30
+ --argjson tokens "$MAX_TOKENS" \
31
+ '{
32
+ model: $model,
33
+ prompt: $prompt,
34
+ temperature: $temp,
35
+ max_tokens: $tokens
36
+ }')
37
+
38
+ response=$(curl -s -X POST "$LLM_ENDPOINT" \
39
+ -H "Content-Type: application/json" \
40
+ -d "$payload")
41
+
42
+ echo "$payload" | jq . > /tmp/llama-title.json
43
+ echo "$response" | jq . >> /tmp/llama-title.json
44
+
45
+ error_message=$(echo "$response" | jq -r '.error.message // empty')
46
+ if [[ -n "$error_message" ]]; then
47
+ echo "LLM API error: $error_message"
48
+ exit 1
49
+ fi
50
+
51
+ echo "$response" | jq -r '.choices[0].text' | sed '/./,$!d' | head -1
52
+ }
53
+
54
+ function main {
55
+ if [ "$(num_commits)" -eq 0 ]; then
56
+ echo "Error: No commits found on branch origin/$TARGET_BRANCH."
57
+ exit 1
58
+ fi
59
+ if [ "$(num_commits)" -eq 1 ]; then
60
+ single_commit_title
61
+ else
62
+ multi_commit_title
63
+ fi
64
+ }
65
+
66
+ main
package/terraform/plan.sh CHANGED
@@ -53,8 +53,10 @@ elif [[ "$PROJECT" == "idp" ]];then
53
53
  -var="old_page_design=${USE_OLD_PAGE_DESIGN}" \
54
54
  -var="use_new_domain=${USE_NEW_DOMAIN}" \
55
55
  -var="configure_autologin=${CONFIGURE_AUTOLOGIN}" \
56
- -var="configure_ui_main=${CONFIGURE_UI_MAIN}" \
56
+ -var="configure_enterprise_ui=${CONFIGURE_ENTERPRISE_UI}" \
57
57
  -var="enable_mfa=${ENABLE_MFA}" \
58
+ -var="configure_ui_cc=${CONFIGURE_UI_CC}" \
59
+ -var="configure_precisefp_client_credentials=${CONFIGURE_PRECISEFP_CLIENT_CREDENTIALS}" \
58
60
  -out .tfplan
59
61
  else
60
62
  terraform plan -var-file="./env/${CURRENT_ENVIRONMENT}/us-west-2/terraform.tfvars" -out .tfplan