Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cherry pick improvements #2298

Merged
merged 3 commits into from
Oct 5, 2023
Merged

Conversation

Garzas
Copy link
Contributor

@Garzas Garzas commented Oct 3, 2023


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  • The need to enhance the flexibility and functionality of the GitHub Action script that automates the cherry-picking of merged PRs from the release/candidate branch.

Causes (Optional)

  • The previous script had limitations in terms of configurability, lacked descriptive comments, and didn't handle submodule updates optimally.

Solutions

  1. Descriptive Comments:

    • Added a comprehensive comment section at the beginning of the script. This section describes its purpose, the sequence of operations, and any prerequisites.
  2. Environment Variables:

    • Introduced the SUBMODULE_NAME to allow dynamic handling based on the submodule's presence.
    • Added the TARGET_BRANCH variable, enabling users to specify a different branch for cherry-picking rather than the default develop.
  3. Dynamic Submodule Handling:

    • Enhanced the script to check changes based on the presence or absence of SUBMODULE_NAME. If set, the script focuses on changes outside that submodule; otherwise, it considers all changes.
  4. Submodule Update:

    • Embedded a step to update the submodule to its latest version from the target branch, provided a submodule name is specified.
  5. Squashing Commits:

    • Implemented commit squashing for submodule updates. This ensures a cleaner commit history by merging the submodule update commit with the merged PR's commit message.
  6. Cherry-pick Strategy Adjustment:

    • Modified the cherry-pick strategy to use --strategy-option theirs. This favors the changes from the PR being cherry-picked during conflicts.
    • Explicitly committed any unresolved merge conflicts to ensure they are highlighted for manual resolution.
  7. Improved Conflict Handling:

    • Enhanced the conflict detection mechanism. The script now identifies files with unresolved conflicts and adds this info to the PR body.
  8. Temporary Branch Cleanup:

    • After performing certain operations on a temporary branch, the script now ensures its deletion, maintaining a clean repository state.

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@Garzas Garzas requested a review from a team October 3, 2023 07:21
@Garzas Garzas self-assigned this Oct 3, 2023
@Garzas Garzas requested review from gongracr, yamilmedina, alexandreferris, borichellow and mchenani and removed request for a team October 3, 2023 07:21
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

Test Results

629 tests  ±0   629 ✔️ ±0   7m 18s ⏱️ - 2m 27s
  92 suites ±0       0 💤 ±0 
  92 files   ±0       0 ±0 

Results for commit 708a6d4. ± Comparison against base commit 3522b4a.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 1125 succeeded.

The build produced the following APK's:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

APKs built during tests are available here. Scroll down to Artifacts!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 1155 succeeded.

The build produced the following APK's:

@Garzas Garzas requested a review from vitorhugods October 5, 2023 07:31
Copy link
Member

@vitorhugods vitorhugods left a comment

Choose a reason for hiding this comment

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

LGTM

Really great. Awesome work

I wonder if we could make it an action of its own tho. Future improvement, maybe.

In a way that it would be easy to just create a wokflow file and add the action with parameters and voilà.

@Garzas Garzas added this pull request to the merge queue Oct 5, 2023
Merged via the queue into develop with commit 2553247 Oct 5, 2023
11 checks passed
@Garzas Garzas deleted the feat/cherry-pick-improvements branch October 5, 2023 10:34
@Garzas Garzas mentioned this pull request Oct 17, 2023
4 tasks
@AndroidBob AndroidBob mentioned this pull request Oct 18, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants