elastic / elastic/ai-github-actions

[information-architecture] PR Actions Detective docs example uses read-only PR permission

Open
#1,827 0 comments 0 reactions 0 assignees View on GitHub
information-architecture
Dominant language
Python
Stars
11
Forks
16
Avg merge
22h 9m
Merged PRs (30d)
31

Description

## Information Architecture Findings

### 1. PR Actions Detective shows a non-working permission in the docs-page example
**Area:** Consistency
**Component(s):** `docs/workflows/gh-agent-workflows/pr-actions-detective.md`, `gh-agent-workflows/pr-actions-detective/example.yml`
**Problem:** The docs page's inline **Example workflow** places `pull-requests: read` in the permissions block, while the installable example in the workflow directory uses `pull-requests: write`. Users who copy the docs-page example instead of downloading `example.yml` can configure the workflow in a location they trust (the docs example block) but end up with permissions that don't match the workflow's comment-posting behavior.

**Evidence:**
- `docs/workflows/gh-agent-workflows/pr-actions-detective.md` (lines 49-54) shows:
- `issues: write`
- `pull-requests: read`
- `gh-agent-workflows/pr-actions-detective/example.yml` (lines 7-13) shows:
- `issues: read`
- `pull-requests: write`

**Suggested improvement:**
Align the docs-page example permissions with `gh-agent-workflows/pr-actions-detective/example.yml` so both entry points present the same control placement and capability assumptions.

## Suggested Actions
- [ ] Update `docs/workflows/gh-agent-workflows/pr-actions-detective.md` example permissions to match `gh-agent-workflows/pr-actions-detective/example.yml`.
- [ ] Add a short note near the example clarifying that PR comment output requires `pull-requests: write`.

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Information Architecture](https://github.com/elastic/ai-github-actions/actions/runs/31725331299)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.