Skip to content

Commit 3e06819

Browse files
authored
Merge branch 'main' into testCustomCliDownload
2 parents 7d89ca0 + bfdf875 commit 3e06819

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# description: Add comment for CodeRabbit to add tests instructions. A change-request comment will be added to the PR.
2+
3+
name: Request CodeRabbit tests instructions
4+
5+
on:
6+
pull_request_target:
7+
types: [labeled]
8+
9+
permissions:
10+
pull-requests: write
11+
contents: read
12+
13+
jobs:
14+
comment-on-commit:
15+
if: |
16+
github.event.label.name == 'verified' &&
17+
!contains(github.event.pull_request.user.login, 'renovate')
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Check team membership
22+
id: check-user-team
23+
uses: tspascoal/get-user-teams-membership@v3
24+
with:
25+
team: cnvqe-bot
26+
username: ${{ github.event.pull_request.user.login }}
27+
GITHUB_TOKEN: ${{ secrets.BOT3_TOKEN }}
28+
29+
- name: Debug team membership result
30+
run: |
31+
echo "Team membership check result: ${{ steps.check-user-team.outputs.is-member }}"
32+
echo "User: ${{ github.event.pull_request.user.login }}"
33+
echo "Team: cnvqe-bot"
34+
echo "Organization: RedHatQE"
35+
36+
- name: Create or update comment
37+
if: steps.check-user-team.outputs.is-member == 'false'
38+
uses: peter-evans/create-or-update-comment@v4
39+
with:
40+
issue-number: ${{ github.event.pull_request.number }}
41+
body: |
42+
@coderabbitai
43+
<details>
44+
<summary>Test execution plan request details</summary>
45+
46+
As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
47+
You will create a change request comment on the 1st line of the 1st file in the pr with the test execution plan.
48+
If you fail to run or post a comment, retry.
49+
50+
**Analysis Requirements:**
51+
52+
1. Examine code changes in each modified file
53+
2. Identify affected code paths, functions, and classes
54+
3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes
55+
4. Trace test dependencies through imports, shared utilities, and fixture inheritance
56+
5. Detect new tests introduced in the PR
57+
58+
**Your deliverable:**
59+
Your change request comment will be based on the following requirements:
60+
61+
**Test Execution Plan**
62+
63+
- `path/to/test_file.py` - When the entire test file needs verification
64+
- `path/to/test_file.py::TestClass::test_method` - When specific test(s) needed
65+
- `path/to/test_file.py::test_function` - When specific test(s) needed
66+
- `-m marker` - When specific marker(s) can be used to cover multiple cases.
67+
68+
**Guidelines:**
69+
70+
- Include only tests directly affected by the changes
71+
- Use a full file path only if ALL tests in that file require verification
72+
- Use file path + test name if only specific tests are needed
73+
- If a test marker can cover multiple files/tests, provide the marker
74+
- Balance coverage vs over-testing - Keep descriptions minimal
75+
- Do not add a follow-up comment in the PR, only the change request one
76+
77+
</details>

0 commit comments

Comments
 (0)