Internal: Automatically create a revert PR [ED-20000]#31827
Merged
Svitlana-Dykun merged 24 commits intomainfrom Jul 14, 2025
Merged
Internal: Automatically create a revert PR [ED-20000]#31827Svitlana-Dykun merged 24 commits intomainfrom
Svitlana-Dykun merged 24 commits intomainfrom
Conversation
- Add reusable action for creating revert PRs when tests fail - Modify Playwright workflow to use the new revert action - Add proper permissions and error handling - Include duplicate prevention logic
- Add test-revert-functionality branch to Playwright workflow triggers - Add test comment to basic-gallery.test.ts for testing purposes - This commit will be used to test the automatic revert PR creation
- Add test-revert-functionality branch to revert PR conditions - Create dedicated failing test for revert PR functionality testing - Fix v4-tests by removing intentional failure - This commit should trigger revert PR creation when pushed
## PR Checklist <!-- Please check if your PR fulfills the following requirements: **Filling out the template is required.** Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion. --> - [ ] The commit message follows our guidelines: https://github.com/elementor/elementor/blob/master/.github/CONTRIBUTING.md ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x" with no spaces eg: [x]. --> - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] CI related changes - [ ] Documentation content changes - [ ] Other... Please describe: ## Summary This PR can be summarized in the following changelog entry: * ## Description An explanation of what is done in this PR * ## Test instructions This PR can be tested by following these steps: * ## Quality assurance - [ ] I have tested this code to the best of my abilities - [ ] I have added unittests to verify the code works as intended - [ ] Docs have been added / updated (for bug fixes / features) Fixes #
## PR Checklist <!-- Please check if your PR fulfills the following requirements: **Filling out the template is required.** Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion. --> - [ ] The commit message follows our guidelines: https://github.com/elementor/elementor/blob/master/.github/CONTRIBUTING.md ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x" with no spaces eg: [x]. --> - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] CI related changes - [ ] Documentation content changes - [ ] Other... Please describe: ## Summary This PR can be summarized in the following changelog entry: * ## Description An explanation of what is done in this PR * ## Test instructions This PR can be tested by following these steps: * ## Quality assurance - [ ] I have tested this code to the best of my abilities - [ ] I have added unittests to verify the code works as intended - [ ] Docs have been added / updated (for bug fixes / features) Fixes #
## PR Checklist <!-- Please check if your PR fulfills the following requirements: **Filling out the template is required.** Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion. --> - [ ] The commit message follows our guidelines: https://github.com/elementor/elementor/blob/master/.github/CONTRIBUTING.md ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x" with no spaces eg: [x]. --> - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] CI related changes - [ ] Documentation content changes - [ ] Other... Please describe: ## Summary This PR can be summarized in the following changelog entry: * ## Description An explanation of what is done in this PR * ## Test instructions This PR can be tested by following these steps: * ## Quality assurance - [ ] I have tested this code to the best of my abilities - [ ] I have added unittests to verify the code works as intended - [ ] Docs have been added / updated (for bug fixes / features) Fixes #
- Remove debugging text from cherry-pick workflow step name - Remove test branch condition from Playwright workflow - Remove intentional test failure file - Keep only essential revert workflow functionality
- Remove invalid 'workflows' permission (not a valid GitHub Actions permission) - Add configurable ALLOW_WORKFLOW_CHANGES parameter to bypass workflow safety check - Enable revert PR creation for commits that modify workflow files - Update Playwright workflow to allow workflow changes in revert PRs
The test-revert-functionality branch was only needed for testing the revert PR functionality. Now that the feature is working and ready for production, we can remove it from the push triggers to keep the workflow clean.
TzviRabinovitch
approved these changes
Jul 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces an automatic revert PR creation functionality that triggers when Playwright tests fail on pushes to main or version branches (3.x).
What's New
🔄 Automatic Revert PR Creation
.github/workflows/create-revert-pr/action.yml🛠️ Key Features
📋 How It Works
mainor3.xbranchesrun-testslabel to ensure the revert is tested🔧 Technical Implementation
🧪 Testing
The PR includes a dedicated test workflow (
.github/workflows/test-revert-pr.yml) that supports:🎯 Benefits
📝 Files Changed
.github/workflows/create-revert-pr/action.yml- New composite action.github/workflows/playwright.yml- Enhanced with revert PR creation.github/workflows/test-revert-pr.yml- Comprehensive test workflow.github/workflows/cherry-pick-pr.yml- Permission fixestests/playwright/sanity/includes/widgets/basic-gallery.test.ts- Test improvementsThis feature significantly improves the development workflow by providing immediate, automated responses to test failures on critical branches, ensuring faster recovery and better code quality maintenance.
✨ PR Description
Purpose: Add automatic revert PR creation functionality when tests fail on main or version branches to quickly restore stability.
Main changes:
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! 🚀