Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guillaumefalourd/stackspot-ai-rqc
StackSpot AI Remote Quick Command Action
https://github.com/guillaumefalourd/stackspot-ai-rqc
ai all-os-supported github-actions stackspot
Last synced: 18 days ago
JSON representation
StackSpot AI Remote Quick Command Action
- Host: GitHub
- URL: https://github.com/guillaumefalourd/stackspot-ai-rqc
- Owner: GuillaumeFalourd
- License: apache-2.0
- Created: 2024-04-23T14:14:07.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-18T03:28:56.000Z (28 days ago)
- Last Synced: 2024-10-19T05:52:56.274Z (27 days ago)
- Topics: ai, all-os-supported, github-actions, stackspot
- Language: Python
- Homepage: https://ai.stackspot.com/
- Size: 55.7 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# stackspot-ai-rqc
[![Daily action Test](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/actions/workflows/daily-action-test.yaml/badge.svg)](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/actions/workflows/daily-action-test.yaml) [![Action Test Ubuntu](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/actions/workflows/action-test-ubuntu.yaml/badge.svg)](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/actions/workflows/action-test-ubuntu.yaml) [![Action Test MacOS](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/actions/workflows/action-test-macos.yaml/badge.svg)](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/actions/workflows/action-test-macos.yaml) [![Action Test Windows](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/actions/workflows/action-test-windows.yaml/badge.svg)](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/actions/workflows/action-test-windows.yaml)
StackSpot AI Remote Quick Command Action
This action forwards an `input_data` to a [StackSpot AI remote quick command](https://ai.stackspot.com/docs/pt-br/quick-commands/create-remote-qc) and returns a JSON as answer (github action output) to be manipulated in future steps for customizable operations.
_Note: This action is supported on all operating systems._
## ⚠️ Prompt configuration (mandatory requirement)
For this action to work, be sure you configured your [Remote Quick Command prompt on StackSpot AI](https://ai.stackspot.com/docs/pt-br/quick-commands/create-remote-qc) with a JSON object as output.
**Example (cf test pipelines above):**
_Check security vulnerabilities describe the vulnerabilities and fix the selected code {{input_data}}_
_Your answer should just be following the JSON structure below:_
```
[
{
"title": "",
"severity": "",
"correction": ""
}
]
```_Where the "title" would be a string resuming the vulnerability in 15 words maximum._
_Where the "severity" would be a string representing the impact of the vulnerability, using critical, high, medium or low._
_Where the "correction" would be a code suggestion to resolve the issue identified._
## 📚 Usage
```yaml
steps:
- uses: actions/checkout@v4- name: Save test data
id: input_data
run: |
# something to generate an $input_data- uses: GuillaumeFalourd/stackspot-ai-rqc@v1
id: rqc
with:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_KEY: ${{ secrets.CLIENT_KEY }}
CLIENT_REALM: ${{ secrets.CLIENT_REALM }}
QC_SLUG: YOUR_REMOTE_QUICK_COMMAND_SLUG
INPUT_DATA: ${{ steps.input_data.outputs. }}- name: Check Remote Quick Command answer
run: echo ${{ toJSON(steps.rqc.outputs.rqc_result) }}
```## ▶️ Action Inputs
Field | Mandatory | Default Value | Observation
------------ | ------------ | ------------- | -------------
**CLIENT_ID** | YES | N/A | [StackSpot](https://stackspot.com/en/settings/access-token) Client ID.
**CLIENT_KEY** | YES | N/A |[StackSpot](https://stackspot.com/en/settings/access-token) Client KEY.
**CLIENT_REALM** | YES | N/A |[StackSpot](https://stackspot.com/en/settings/access-token) Client Realm.
**QC_SLUG** | YES | N/A | [StackSpot Remote Quick Command reference](https://ai.stackspot.com/docs/pt-br/quick-commands/create-remote-qc)
**INPUT_DATA** | YES | N/A | Data that will be received and analyzed by the remote quick command## ▶️ Action Output
Field | Observation
------------ | -------------
**rqc_result** | Can be accessed by using `${{ toJSON(steps.rqc.outputs.rqc_result) }}`## 🤝 Contributing
☞ [Guidelines](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/blob/main/CONTRIBUTING.md)
## 🏅 Licensed
☞ This repository uses the [Apache License 2.0](https://github.com/GuillaumeFalourd/stackspot-ai-rqc/blob/main/LICENSE)