Skip to content

docs: add reusable cherry-pick prompt for automated agents#2

Draft
Copilot wants to merge 40 commits intorelease/ulmofrom
copilot/chorecherry-pick-develop-teak3-into-ulmo
Draft

docs: add reusable cherry-pick prompt for automated agents#2
Copilot wants to merge 40 commits intorelease/ulmofrom
copilot/chorecherry-pick-develop-teak3-into-ulmo

Conversation

Copy link

Copilot AI commented Mar 4, 2026

Description

Adds .github/prompts/cherry-pick-between-branches.prompt.md — a reusable, repo-agnostic prompt that guides automated agents through cross-branch cherry-pick operations.

Distilled from the mistakes made during PRs #1 and #2 in this repo, where the Copilot agent:

  • Used git merge --allow-unrelated-histories to fix push divergence → polluted PR with ~200 commits instead of 38
  • Opened PR against master instead of release/ulmo → couldn't change base branch after creation
  • Cherry-picked a commit that changed RELEASE_LINE to "teak" without reverting it for the ulmo branch
  • Included merge commits in the cherry-pick list
  • Did not document individual conflict resolutions

The prompt covers:

  • Parameterized inputs (SOURCE_BRANCH, TARGET_BRANCH, CONFLICT_STRATEGY) for reuse across repos
  • 7-step procedure with copy-paste bash scripts: branch setup, commit filtering (--no-merges), cherry-pick loop with inline conflict resolution, post-cherry-pick config review, PR creation
  • "Mistakes to avoid" section with concrete failure descriptions and fixes
  • Quick-reference checklist for before/during/after the operation

To use in another repo, copy the file to .github/prompts/ and reference it from a Copilot chat.

Supporting information

Testing instructions

Documentation-only change. Review the prompt for completeness and clarity.

Deadline

None

Other information

No runtime, migration, or dependency changes.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

navinkarkera and others added 27 commits March 4, 2026 04:52
…penedx#36599) (openedx#36645)

* refactor: update sync model helper function docs

Adds some comments to explain certain confusing sections

* refactor: sync library content method

* feat: use edited_on block field

* test: modified field in course block index

* fix: extract uncommon methods to child class from base

(cherry picked from commit c2d9e40)
…-0083] (openedx#36528)

* feat: store content.child_usage_keys in Container search document
  Stores the draft children + published children (if applicable)

Related fixes:
* fix: lib_api.get_container does not take a "user" arg
* refactor: fetch_customizable_fields_from_container does not need a "user" arg
* refactor: moves tags_count into LibraryItem
   because anything that appears in a library may be tagged.
* refactor: remove get_container_from_key from public API
   API users must use get_container and ContainerMetadata.
* refactor: made set_library_item_collections take an entity_key string instead of
  a PublishableEntity instance, so we don't need to fetch a Container object to call it.
* refactor: changed ContainerLink.update_or_create to take the container PK
  instead of a Container object, since this is enough.
  Added container_pk to ContainerMetadata to support this.

(cherry picked from commit 5b3caa9)
) (openedx#36687)

* fix: "[created] received a naive datetime"
* fix: leaky "isolation" of events was causing test failures
* fix: make lib events more specific, emit them async, handle hierarchy correctly
* chore: bump openedx-events to 10.2.0 for new library PUBLISHED events

(cherry picked from commit 2e91a05)

Co-authored-by: Braden MacDonald <braden@opencraft.com>
…penedx#36656) (openedx#36701)

Returns the last_published_at date from the upstream summary endpoint.
…enedx#36703)

* Fix published param to support strings
* Add published_display_name to children response
openedx#36615)

Python's tempfile naming also includes underscore:
https://github.com/python/cpython/blob/3.12/Lib/tempfile.py#L140

This omission would cause normalization to fail about 1/6 of the time.

Also expand test to exercise more of character range.

(cherry picked from commit ca335b3)
This is intended to make logs more or less a standalone source for
analyzing mismatches.

- Only log mismatches or exceptions
- Merge local and remote log messages into one so they can be correlated
  more easily
- Different log messages for mismatch vs. unexpected exceptions
- Include course ID (as limit overrides context) in log message

(cherry picked from commit 5bc0581)
…nedx#36682)

For darklaunch comparisons where the two sides have different Python
versions, we'll want a more comprehensive list of normalizers.

- Expand the default list to include patterns discovered during a Python
  3.8 vs. 3.12 comparison.
- Append the setting value by default, rather than replacing (but still
  allow replacing).
- Use default normalizers if custom ones can't be loaded.
- Add log message when loading normalizers fails.
- Validate the replacement pattern, not just the search pattern.

(cherry picked from commit d5a273c)
Fix "Add" button in LTI editor in v2 library. The iframe studio view renderer in library now supports legacy studio view.

(cherry picked from commit 1002f5f)
Allow overriding but prevent download by default.

Also, extract `PYTHON_LIB_FILENAME` Django setting as a shared function
and document the setting.
…penedx#36766)

When duplicating an xblock in the authoring MFE, the iframe was opening its own editor modal instead of the MFE modal.
… (openedx#36772)

* fix: TinyMCE editors in advanced block editors
* Sets baseUrl to avoid an error in: https://github.com/openedx/XBlock/blob/86eee4b05dffa42b009fab2a9050b73766131b9d/xblock/utils/public/studio_edit.js#L52
* Uncouple the listener func of the cancel button (see the comment)
* chore: Add `edx_sga` in `LIBRARY_ENABLED_BLOCKS`
…dx#36723) (openedx#36773)

Fixes an error that is triggered when trying to copy/pasting Drag-and-drop block into Courses.

When a block is pasted into a Course or Library, we perform a search/replace on block's data to replace any old static URLs with their new path. Ordinary blocks like HTML and Video have a simple string of data where static URLs may live, but DnDv2 blocks have a dict of data which can contain other dicts and lists of strings that need to be modified. Other XBlocks may have similarly complex structures, and so this fix will resolve them as well.

This fixes the issue by recursing into the data structure to locate all the strings where replacements may need to be made.

This fix helps Course Authors use content staging in their Courses.

(cherry picked from commit 21399b4)
While trying to be enrolled on a verified course, the upgrade process
gets to an error screen due to a double slash on the URL that it's added
while doing the redirection to the account microfrontend

Backport of: 89e3d18
Closes: openedx/wg-build-test-release#468
…penedx#36924)

The api/courseware/course fails for all the verified enrollments if you
are not using Account MFE, which means that you probably won't set
ACCOUNT_MICROFRONTEND_URL in your settings/configurations.
So this PR adds a check safely try to do rstrip.

Fixes a bug in openedx#36870
Backport of: d6dbc40
* Backport of fix: Edit components in unit that comes from libraries openedx#36914
* Backport of build: remove outdated dependency path openedx#36861, to fix the broken CI
* feat: filter organizations with new openedx-filter (edly-io#671)

We add a new filter OrganizationsRequested that is used to show organizations linked to the current tenant.

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>

* fix: include error_code in PreventRegistration exception response (edly-io#684)

The Authn MFE relies on the `error_code` in API responses to display appropriate error messages to users. Although the PreventRegistration exception already supports `error_code`, it was not previously included in the API response payload.

This change ensures that `error_code` is returned in the response when a PreventRegistration exception is raised, allowing the frontend to handle errors more accurately.

---------

Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
…its from libraries [FC-0097] (openedx#37282)

* Show disabled edit button and tooltip to component in units from libraries
Co-authored-by: waleed.mujahid <m.waleed4943@gmail.com>
Waleed-Mujahid and others added 11 commits March 4, 2026 04:53
Added functionality to conditionally send email notifications based on user roles and context. Introduced helper methods to determine if an email should be sent and to create an unsubscribe URL for users. This improves the user experience by ensuring relevant notifications are sent only when necessary.
…o#703)

* feat: Add user email replacement in HTML block data rendering

* fix: Refactor user email retrieval in HTML block rendering
* Enable Forum Notifications for Threads#123
Preview

* chore: add edly custom comment

* fix: apply safe filter to comment body in email notification template
…#712)

Added functionality to delete logged-in cookies after account deletion in the DeactivateLogoutView, preventing unauthorized access to linked services. This change improves user security by ensuring that session data is cleared upon account removal.
* fix: Don't show non-active programs edly-io#317

* feat: Enhance program caching by filtering active tenants and using tenant-specific catalog API URLs
edly-io#709)

* feat: align rerun creator status permission with course creator status

* feat: allow global course creators to access course rerun and site courses.

This commit adds EDLY custom changes to let global course creator have
permission to rerun a course and get access to all the courses on site.

feat: Provide all course permissions to global course creators
make use utils to reduce number of lines changed in core. Refactor some logic so it can be used in other places i.e, figures
* feat: Validate country input during student registration

Added validation to ensure that the country code provided during student registration is valid. If the country code is invalid, an error message is appended to the row errors for appropriate feedback.

* feat: Trigger event on student registration completion

- Added functionality to send a STUDENT_REGISTRATION_COMPLETED event upon successful user creation
- This signal is used to create EdlyMultiSiteAccess objects that give tenant access
…y-io#721)

This update introduces a new field, passed_timestamp, to both CourseGrade and CourseGradeFactory classes, enhancing the tracking of grade status updates.
Copilot AI changed the title [WIP] Cherry-pick missing commits from develop-teak.3 to release/ulmo Cherry-pick develop-teak.3 commits into release/ulmo Mar 4, 2026
@AhtishamShahid AhtishamShahid changed the base branch from master to release/ulmo March 4, 2026 08:21
Copilot AI changed the title Cherry-pick develop-teak.3 commits into release/ulmo fix: remove merge commit polluting PR with 200 commits instead of 38 Mar 4, 2026
@AhtishamShahid AhtishamShahid force-pushed the copilot/chorecherry-pick-develop-teak3-into-ulmo branch from 0261e39 to ed8d9ae Compare March 4, 2026 08:47
Copilot stopped work on behalf of AhtishamShahid due to an error March 4, 2026 08:49
Copilot AI and others added 2 commits March 4, 2026 08:53
Co-authored-by: AhtishamShahid <26253150+AhtishamShahid@users.noreply.github.com>
…cit git reset

Co-authored-by: AhtishamShahid <26253150+AhtishamShahid@users.noreply.github.com>
Copilot AI changed the title fix: remove merge commit polluting PR with 200 commits instead of 38 docs: add reusable cherry-pick prompt for automated agents Mar 4, 2026
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.