1- name : final PR code dev
1+ name : DEV
22
33on :
44 pull_request_target :
3333 id : prepare_json_files
3434 run : |
3535
36- echo "🔍 Collecting changed JSON files…"
36+ echo " Collecting changed JSON files…"
3737 BASE="${{ github.event.pull_request.base.sha }}"
3838 HEAD="${{ github.event.pull_request.head.sha }}"
3939
@@ -68,18 +68,18 @@ jobs:
6868 id : fetch_token
6969 run : |
7070
71- echo "🔐 Fetching OIDC token…"
71+ echo " Fetching OIDC token…"
7272 raw=$(curl -s -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=api://${CLIENT_ID}")
7373 token=$(echo "$raw" | jq -r .value)
7474 echo "✔️ Got token (length=${#token})"
7575 echo "TOKEN=$token" >> $GITHUB_ENV
7676
7777
78- - name : Health-check GET
78+ - name : Health-check
7979 if : env.JSON_PAYLOAD_PATH != 'empty'
8080 run : |
8181
82- echo "🚀 Hitting $API_BASE…"
82+ echo " Hitting $API_BASE…"
8383 # Capture both body and status
8484 resp=$(curl -s -w "\n%{http_code}" -H "Authorization: Bearer $TOKEN" "$API_BASE")
8585 body=$(echo "$resp" | sed '$d') # all but last line
@@ -99,18 +99,19 @@ jobs:
9999 exit 1
100100 fi
101101
102- - name : 📦 POST CCP payload
102+ - name : POST CCP payload
103103 if : env.JSON_PAYLOAD_PATH != 'empty'
104104 run : |
105105 echo "Sending JSON payload to API"
106106
107- response=$(curl -s -X POST "$API_BASE/dataConnector" -H "Authorization: Bearer $TOKEN" -H "Source: GitHub" -H " Content-Type: application/json" --data-binary "@$JSON_PAYLOAD_PATH")
107+ response=$(curl -s -X POST "$API_BASE/CCP_dataconnector" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -H "Source: GitHub" --data-binary "@$JSON_PAYLOAD_PATH")
108108
109109 result_status=$(echo "$response" | jq -r '.status // empty')
110110 message=$(echo "$response" | jq -r '.message // "No message provided"')
111111
112112 if [ "$result_status" != "passed" ]; then
113- echo -e " ❌ Validation failed: \n $message"
113+ echo -e " ❌ Validation failed: \n \n"
114+ echo -e " $message"
114115 exit 1
115116 fi
116117
0 commit comments