Project Update Bot should create MRs instead of using patches

Created on 15 June 2022, almost 3 years ago
Updated 17 March 2024, about 1 year ago

Since we are moving to GitLab fully at some point we should move to merge requests instead of patches. In order to make the transistion smooth also post the patch files. This means we can also keep on checking for changes using the diff of the patches which saves a lot of time. It also makes it easier to create a new branch and apply the changes by the bot.

The branch will be a dedicated branch 'project-update-bot-only' so we wont have problems like checking for user work on that branch. That is no fun. It should just force push every time to make sure the project-update-bot-only is up-to-date and rebased every change.

Proposed solution

Use git identity of the project update bot to create an issue fork and use push-options to create a merge request of the changes. The flow goes like this:

  1. Start with previous flow.
  2. When an comment is posted start the MR logic
  3. Check if an issue fork is present
  4. If not present create an issue fork
  5. Extract the issue fork name from the page
  6. Clone the project
  7. Checkout the version the bot ran against as a a new branch 'project-update-bot-only'
  8. Add the issue fork remote to the repository
  9. Apply the patch to the branch and commit
  10. Push to the issue fork with git options: git push update-bot project-update-bot-only --force -o merge_request.create -o merge_request.target_project="project/project_short_name" -o merge_request.title="Automated Project Update Bot fixes" -o merge_request.description="This merge request was automatically created by the Project Update Bot. It contains the changes from run 57812"
  11. This will either: create the branch and a MR or force-update the branch and create a MR or force update the MR
  12. Profit ;)

Add test projects after merge. Test projects:

use_test_projects:
  - color
  - mailing_subscriber
  - jsonapi_extras
  - mailing_subscriber_mailchimp
  - twig_renderable
  - admin_toolbar_entity_version
  - admin_toolbar_tasks
  - paragraphs_edit
  - color
  - contact_storage
  - default_content
  - email_registration
  - empty_fields
  - forum
  - masquerade
  - migrate_generator
  - panels_everywhere
  - xhprof
  - commerce_cart_flyout
  - commerce_cart_api
  - views_remote_data
  - deprecation_status
  - upgrade_status

Will add those in batches to make sure things are O.K.

✨ Feature request
Status

Fixed

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Greg Boggs Portland Oregon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024