Skip to content

Enhance /exclude workflow and ProblemList insertions (#7340) - #7376

Open
Agaba-derrick wants to merge 3 commits into
adoptium:masterfrom
Agaba-derrick:issue-7340-exclude-workflow-improvements
Open

Enhance /exclude workflow and ProblemList insertions (#7340)#7376
Agaba-derrick wants to merge 3 commits into
adoptium:masterfrom
Agaba-derrick:issue-7340-exclude-workflow-improvements

Conversation

@Agaba-derrick

@Agaba-derrick Agaba-derrick commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
  • Extracted the exclude-openjdk-test job from autoTestPR.yml into a dedicated .github/workflows/exclude-openjdk-test.yml file to improve discoverability.

  • Updated the documentation reference in docs/pages/userGuide.md to point to the correct openjdk/README.md#exclude-a-testcase anchor.

  • Enhanced exclude_openjdk.py to insert test exclusions into the appropriate directory section within ProblemList files instead of blindly appending them to the bottom.

  • Added unit tests in test_exclude_openjdk.py to validate the new section insertion logic across multiple edge cases.

Closes #7340

- Extracted the exclude-openjdk-test job from autoTestPR.yml into a dedicated .github/workflows/exclude-openjdk-test.yml file to improve discoverability.

- Updated the documentation reference in docs/pages/userGuide.md to point to the correct openjdk/README.md#exclude-a-testcase anchor.

- Enhanced exclude_openjdk.py to insert test exclusions into the appropriate directory section within ProblemList files instead of blindly appending them to the bottom.

- Added unit tests in test_exclude_openjdk.py to validate the new section insertion logic across multiple edge cases.
@Agaba-derrick

Copy link
Copy Markdown
Contributor Author

CC: @smlambert Kindly asking for a review

@karianna

Copy link
Copy Markdown
Contributor

@Agaba-derrick Will need a rebase

@karianna
karianna requested a review from smlambert July 22, 2026 04:33
karianna
karianna previously approved these changes Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the /exclude automation by making the workflow easier to discover, fixing documentation, and enhancing exclude_openjdk.py so new exclusions are inserted near related entries in ProblemList files rather than appended to the end (as requested in #7340).

Changes:

  • Split the /exclude GitHub Actions job out of autoTestPR.yml into a dedicated .github/workflows/exclude-openjdk-test.yml.
  • Update user guide documentation to reference the correct openjdk/README.md#exclude-a-testcase section.
  • Add find_insertion_index() and unit tests to insert new exclusions into an appropriate directory area of ProblemList files.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/disabled_tests/exclude_openjdk.py Adds insertion-index selection logic and uses it when writing new exclusions.
scripts/disabled_tests/tests/test_exclude_openjdk.py Adds unit tests for the new insertion behavior.
docs/pages/userGuide.md Fixes the platform reference link for /exclude.
.github/workflows/exclude-openjdk-test.yml New dedicated workflow for handling /exclude issue comments.
.github/workflows/autoTestPR.yml Removes the extracted exclude-openjdk-test job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/exclude-openjdk-test.yml Outdated
Comment thread scripts/disabled_tests/exclude_openjdk.py Outdated
Comment on lines +314 to +327
def test_find_insertion_index_match_commented_out(self):
lines = [
"#############################################################################\n",
"\n",
"# jdk_beans\n",
"\n",
"# java/beans/PropertyEditor/TestColorClass.java https://bugs.openjdk.java.net/browse/JDK-1 macosx-all\n",
"\n"
]

idx = find_insertion_index(lines, "java/beans/PropertyEditor/TestColorClassValue.java")
# Matches the commented out testcase
self.assertEqual(idx, 5)

Comment thread .github/workflows/exclude-openjdk-test.yml Outdated
…ion bug

- Remove issue-author permission bypass; only AQAvit committers (write/admin)
  can trigger /exclude (per @smlambert and @sophia-guo)
- Fix 'Comment no changes' step: replace stale TARGETS/TESTCASE env vars with
  correct TESTCASES output variable
- Fix find_insertion_index() to recognise both '#java/...' and '# java/...'
  commented-out testcase formats in ProblemList files
- Add unit test for '#java/...' (no space) format to prevent regression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvements to /exclude workflow

5 participants