Compare commits
2 Commits
0215a8b7df
...
370fbdf72f
| Author | SHA1 | Date | |
|---|---|---|---|
| 370fbdf72f | |||
| 9a20b6e778 |
@@ -60,6 +60,9 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: go mod tidy
|
||||
|
||||
- name: Install swag
|
||||
run: go install github.com/swaggo/swag/cmd/swag@latest
|
||||
|
||||
- name: Generate Swagger Docs
|
||||
run: cd pkg/server && go generate
|
||||
|
||||
@@ -91,9 +94,6 @@ jobs:
|
||||
- name: Run go fmt
|
||||
run: go fmt ./...
|
||||
|
||||
- name: Run go vet
|
||||
run: go vet ./...
|
||||
|
||||
- name: Check for formatting issues
|
||||
run: |
|
||||
if [ -n "$(go fmt ./...)" ]; then
|
||||
|
||||
@@ -58,6 +58,16 @@ Get the current status of a specific job.
|
||||
- `repo`: Repository name
|
||||
- `job_id`: Job ID
|
||||
|
||||
**Web UI Link:**
|
||||
The response includes a `html_url` field that provides a direct link to view the job in Gitea's web interface.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
# Get job status and extract web UI link
|
||||
gitea-client job-status arcodange DanceLessonsCoach 351 | jq '.html_url'
|
||||
# Output: "https://gitea.arcodange.lab/arcodange/DanceLessonsCoach/actions/runs/3"
|
||||
```
|
||||
|
||||
### Get Job Logs
|
||||
|
||||
```bash
|
||||
@@ -117,6 +127,15 @@ List all jobs for a specific workflow run.
|
||||
- `repo`: Repository name
|
||||
- `workflow_run_id`: Workflow run ID
|
||||
|
||||
**Web UI Links:**
|
||||
Each job in the response includes a `html_url` field for direct access to that specific job's web interface.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
# List all jobs and extract their web UI links
|
||||
gitea-client list-workflow-jobs arcodange DanceLessonsCoach 351 | jq '.jobs[] | "Job \(.id): \(.name) - \(.html_url)"'
|
||||
```
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# List all jobs for workflow run 350
|
||||
@@ -264,6 +283,27 @@ The skill handles common API errors:
|
||||
4. **Logging**: Redirect output to files for debugging
|
||||
5. **Timeouts**: Use reasonable timeouts for wait operations
|
||||
|
||||
## Web UI Integration
|
||||
|
||||
All API responses include `html_url` fields that provide direct links to Gitea's web interface. Use these to:
|
||||
|
||||
```bash
|
||||
# Get web UI link for a job
|
||||
job_url=$(gitea-client job-status owner repo job_id | jq -r '.html_url')
|
||||
echo "View in browser: $job_url"
|
||||
|
||||
# Open job directly in browser (macOS)
|
||||
open $(gitea-client job-status owner repo job_id | jq -r '.html_url')
|
||||
|
||||
# Linux/WSL
|
||||
xdg-open $(gitea-client job-status owner repo job_id | jq -r '.html_url')
|
||||
```
|
||||
|
||||
**Common URL Patterns:**
|
||||
- Job: `https://gitea.arcodange.lab/arcodange/DanceLessonsCoach/actions/runs/{run_id}`
|
||||
- Workflow: `https://gitea.arcodange.lab/arcodange/DanceLessonsCoach/actions`
|
||||
- PR: `https://gitea.arcodange.lab/arcodange/DanceLessonsCoach/pulls/{pr_number}`
|
||||
|
||||
## Implementation Details
|
||||
|
||||
The skill uses:
|
||||
|
||||
@@ -38,7 +38,7 @@ fi
|
||||
if command -v yamllint >/dev/null 2>&1; then
|
||||
for file in "${WORKFLOW_FILES[@]}"; do
|
||||
if [ -f ".yamllint.yaml" ]; then
|
||||
yamllint -c .yamllint.yaml "$file"
|
||||
yamllint -c "$(pwd)/.yamllint.yaml" "$file"
|
||||
else
|
||||
yamllint "$file"
|
||||
fi
|
||||
@@ -47,7 +47,7 @@ elif docker info >/dev/null 2>&1; then
|
||||
for file in "${WORKFLOW_FILES[@]}"; do
|
||||
if [ -f ".yamllint.yaml" ]; then
|
||||
docker run --rm -v $(pwd):/workspace -w /workspace pipelinecomponents/yamllint:latest \
|
||||
yamllint -c .yamllint.yaml "$file"
|
||||
yamllint -c /workspace/.yamllint.yaml "$file"
|
||||
else
|
||||
docker run --rm -v $(pwd):/workspace -w /workspace pipelinecomponents/yamllint:latest \
|
||||
yamllint "$file"
|
||||
|
||||
Reference in New Issue
Block a user