Skip to content

Fixed branch selection for excluding packages#56

Merged
micszo merged 2 commits intomainfrom
fix-limit-packages-update
Sep 15, 2022
Merged

Fixed branch selection for excluding packages#56
micszo merged 2 commits intomainfrom
fix-limit-packages-update

Conversation

@mnocon
Copy link
Copy Markdown
Contributor

@mnocon mnocon commented Sep 14, 2022

Follow-up to #55 , only 9eb669c constains new code (0b7f22c has already been reviewed)

The current branch selection logic is flawed:

  • when PR is made to a branch called 1.3 then endpoint https://github.com/ibexa/$EDITION/1.3/composer.json is used - but https://github.com/ibexa/$EDITION/3.3/composer.json should be used instead.
  • when PR is made to a branch called main then endpoint https://github.com/ibexa/$EDITION/main/composer.json is used - but https://github.com/ibexa/$EDITION/master/composer.json should be used instead.

It worked in ibexa/content#53 because the PR base branch (3.3) is the same as the endpoint that should be used - but it fails in https://github.com/ezsystems/ezplatform-version-comparison/pull/79

I thought I could avoid harcoding the branches by doing some magic with Github env variables, but it's not possible - hardcoding it seems like the easiest solution.

Tested in https://github.com/ezsystems/ezplatform-version-comparison/pull/79

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mnocon mnocon marked this pull request as ready for review September 14, 2022 13:58
@mnocon mnocon changed the title Fix limit packages update Fixed branch selection for excluding packages Sep 14, 2022
Copy link
Copy Markdown
Contributor

@micszo micszo left a comment

Choose a reason for hiding this comment

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

Will it require updating when new stable branch is created?

@mnocon
Copy link
Copy Markdown
Contributor Author

mnocon commented Sep 14, 2022

Yes, I will do it when creating stable branches. We might be able to simplify it for v4 in the future:

  • PR to main -> use master
  • PR to branch other than main -> use the branch name
    because versioning is unified in v4

But right now I'm not 100% sure we can rely on this logic, so I'd like to merge this hardcoded way first to see how to works in practice

@micszo micszo merged commit eacdb78 into main Sep 15, 2022
@micszo micszo deleted the fix-limit-packages-update branch September 15, 2022 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants