mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
### **User description**
Reduced the types of GitHub issue events to log. Updated the step name
for sending events to OpenObserve and streamlined the payload creation
process.
___
### **PR Type**
Enhancement
___
### **Description**
- reduce logged GitHub issue event types
- streamline payload handling step
- send raw event JSON directly
- remove optional debug logging
___
### Diagram Walkthrough
```mermaid
flowchart LR
A["GitHub issues events"]
B["Filtered issue types trigger"]
C["Prepare raw JSON payload"]
D["OpenObserve ingest endpoint"]
A --> B
B --> C
C -- "POST" --> D
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>log-issues-to-o2.yml</strong><dd><code>Simplify
workflow payload handling</code>
</dd></summary>
<hr>
.github/workflows/log-issues-to-o2.yml
<ul><li>reduced issue event types in trigger<br> <li> renamed send step
to OpenObserve<br> <li> replaced jq JSON build with raw payload<br> <li>
removed debug logging step</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10265/files#diff-09437ebece075b9bf642638da74437927a6da99f27acdceb5e3f74406ab9e567">+5/-105</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
25 lines
648 B
YAML
25 lines
648 B
YAML
name: GitHub Issues → OpenObserve
|
|
|
|
on:
|
|
issues:
|
|
types: [opened, edited, deleted, closed, reopened, assigned, unassigned, labeled, unlabeled]
|
|
issue_comment:
|
|
types: [created, edited, deleted]
|
|
|
|
jobs:
|
|
capture:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Send GitHub event to OpenObserve
|
|
env:
|
|
GITHUB_EVENT_JSON: ${{ toJson(github.event) }}
|
|
run: |
|
|
curl -X POST "${{ secrets.OO_CLOUD_INGEST_URL }}" \
|
|
-H "Authorization: Basic ${{ secrets.OO_CLOUD_AUTH }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d "$GITHUB_EVENT_JSON"
|
|
|