> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/guides/sap/user-story-coverage/technical-overview/deployment-guide/us1_getresults.sh.md).

# US1\_getResults.sh

This guide explains how to configure the `US1_getResults.sh` script to extract code-to-ticket information from Git and update your SeaLights TGA report.

***

### **Required Variables**

* **SEALIGHTS\_API\_TOKEN:** Your SeaLights API token (securely store it with a Secret Manager if possible).
* **DOMAIN:** Your SeaLights domain (e.g., `yourdomain.sealights.co`).
* **DAYS\_BACK:** Number of days back to analyze code changes (e.g., 30).
* **OUTPUT\_FOLDER:** Path where results will be saved (default is current directory).
* **KEY\_PATTERN\_REGEX:** Regular expression to match ticket IDs in Git commit comments (e.g., `JIRA-[0-9]+`).
* **HIGHEST\_PATTERN\_REGEX:** Keyword indicating critical code (default is `Critical`).
* **UPDATE\_LATEST\_TGA:** Set to `true` to update existing TGA reports with latest builds.
* **CREATE\_NOT\_EXIST\_TGA\_DAYS:** Days back to create TGA reports for missing apps.
* **APPLICATION\_LIST:** JSON array defining applications to analyze:
  * **appName:** Application name in SeaLights.
  * **branchName:** Branch name in SeaLights.
  * **base\_url:** SSH base URL for repos or components.
  * **repoName:** Repo name for single components (empty for integration builds).

### **Optional Variables**

* **GIT\_KEYFILE:** Path to a temporary Git SSH key file (if not using default SSH keys).
* **REPO\_MAP:** Map component names to different base URLs or repo names (uncomment and update if needed).

***

### **Customization and Tips**

* Update regular expressions according to your ticket ID format and critical code keywords.
* Consider environment variables for sensitive information like API tokens.
* Adjust `DAYS_BACK` and `CREATE_NOT_EXIST_TGA_DAYS` based on your data retention needs.
* Add more applications to the `APPLICATION_LIST` as needed.
* Modify the script logic and variables for specific workflows.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sealights.io/knowledgebase/guides/sap/user-story-coverage/technical-overview/deployment-guide/us1_getresults.sh.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
