Skip to content

Commit c3d45ba

Browse files
Copilotmnkiefer
andcommitted
Add integration test workflow for ProjectOps PAT requirements documentation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
1 parent 1caf3ed commit c3d45ba

1 file changed

Lines changed: 116 additions & 0 deletions

File tree

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
description: Test ProjectOps PAT requirements documentation for user-owned and org-owned Projects v2
3+
on:
4+
workflow_dispatch:
5+
schedule: weekly on monday
6+
permissions:
7+
contents: read
8+
actions: read
9+
issues: read
10+
pull-requests: read
11+
name: Test ProjectOps PAT Requirements
12+
engine: copilot
13+
timeout-minutes: 30
14+
tools:
15+
bash:
16+
- "*"
17+
github:
18+
mode: remote
19+
toolsets: [default]
20+
safe-outputs:
21+
create-issue:
22+
max: 1
23+
expires: 7d
24+
labels: [documentation, projectops, testing]
25+
---
26+
27+
# Test ProjectOps PAT Requirements Documentation
28+
29+
This workflow validates the PAT setup documentation for GitHub Projects v2 by creating temporary trial repositories, testing different PAT configurations, and verifying the documented requirements are accurate.
30+
31+
## Test Objectives
32+
33+
1. **Verify User-owned Projects PAT Requirements**
34+
- Classic PAT with `project` scope works
35+
- Fine-grained PAT does NOT work (as documented)
36+
37+
2. **Verify Organization-owned Projects PAT Requirements**
38+
- Classic PAT with `project` + `read:org` works
39+
- Fine-grained PAT with explicit org access + Projects: Read+Write works
40+
- Fine-grained PAT without explicit org access fails (as documented)
41+
42+
3. **Validate Documentation Accuracy**
43+
- Confirm all setup instructions are correct
44+
- Verify scope requirements match actual API behavior
45+
- Test both public and private repository scenarios
46+
47+
## Test Execution Plan
48+
49+
**IMPORTANT**: This is a validation test. Do NOT create actual trial repositories or test real PATs. Instead:
50+
51+
1. **Review Documentation**: Read the current ProjectOps PAT documentation at:
52+
- `docs/src/content/docs/reference/tokens.md` (GH_AW_PROJECT_GITHUB_TOKEN section)
53+
- `docs/src/content/docs/examples/issue-pr-events/projectops.md` (Token Requirements section)
54+
55+
2. **Verify Documented Scopes Match GitHub API Requirements**:
56+
- Check GitHub's official Projects v2 API documentation
57+
- Confirm the documented scopes align with actual API permissions
58+
- Verify the distinction between user and org Projects is accurate
59+
60+
3. **Check for Consistency**:
61+
- Ensure all three documentation files have consistent information
62+
- Verify links between documents are correct
63+
- Check that examples match the documented requirements
64+
65+
4. **Identify Gaps or Errors**:
66+
- Are there any missing scenarios or edge cases?
67+
- Are the instructions clear enough to follow?
68+
- Are there any contradictions between documents?
69+
70+
## Test Results
71+
72+
Create an issue with your findings:
73+
74+
**Title**: "ProjectOps PAT Documentation Validation - [PASS/FAIL] - $(date +%Y-%m-%d)"
75+
76+
**Body** (use markdown format):
77+
78+
### Documentation Review
79+
80+
- **Consistency Check**: [PASS/FAIL]
81+
- Note: [Explanation if any inconsistencies found]
82+
83+
- **Scope Accuracy**: [PASS/FAIL]
84+
- User-owned Projects requirements: [Verified/Issues found]
85+
- Org-owned Projects requirements: [Verified/Issues found]
86+
87+
- **Clarity and Completeness**: [PASS/FAIL]
88+
- Missing information: [List if any]
89+
- Unclear instructions: [List if any]
90+
91+
### Recommendations
92+
93+
[List any improvements or clarifications needed]
94+
95+
### GitHub API Documentation Cross-Reference
96+
97+
[Link to relevant GitHub API docs that confirm the requirements]
98+
99+
---
100+
101+
**Test Metadata**:
102+
- Workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
103+
- Repository: ${{ github.repository }}
104+
- Test date: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
105+
106+
**Labels**: The issue will automatically have `documentation`, `projectops`, and `testing` labels applied.
107+
108+
## Notes
109+
110+
This test validates documentation accuracy without requiring actual PAT testing, which would require:
111+
- Creating GitHub Apps or PATs with various permission combinations
112+
- Setting up test organizations and user accounts
113+
- Creating and destroying trial repositories
114+
- Managing API rate limits and quota
115+
116+
For actual integration testing with real PATs, use the `gh aw trial` command with appropriate test repositories as described in the TrialOps guide.

0 commit comments

Comments
 (0)