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: create pull requests for solution merges #61

Merged
merged 15 commits into from
Feb 28, 2021

Conversation

ewingjm
Copy link
Owner

@ewingjm ewingjm commented Feb 28, 2021

Purpose

Currently, solution merges can only be pushed directly to a branch named 'master'. This is a problem because:

  • No pull request means it is possible to accidentally commit changes that would only be visible at the source level
  • A fixed target branch of 'master' means difficulty supporting various Git workflows (or alternative default branch names such as 'main')
  • Merge conflicts cause a solution merge to fail 'silently' meaning that the next solution merge will contain the failed solution merge's solution components but will be missing the source branch
  • Only one work item could be linked to a solution merge commit

Resolves #35, resolves #31, resolves #25.

Approach

Introduces two new configuration tables - Projects and Repositories. When configuring a repository, it's now possible to specify a Source Control Strategy of either Push or Pull request. It's also possible to configure a target branch e.g. 'master', 'main', 'develop' etc.

A source control strategy of Push will behave similarly to older versions of the Development Hub with one exception - the solution merge will only go to a status of Merged when the commit is in source control. Previously, the solution merge would go to a status of Merged when a new Solution Version record was created with the post-merge unmanaged and managed zips attached. Solution versions have been removed as part of this commit in favour of the source control based approach.

A source control strategy of Pull request will go from a status of Merging to a status of Awaiting PR Merge. When a solution merge reaches this status, a pull request will have been automatically created for the solution merge. It will reach a status of Merged when this pull request has been completed.

TODOs

  • Automated test coverage for new code
  • Documentation updated (if required)
  • Build and tests successful

@ewingjm ewingjm added the enhancement New feature or request label Feb 28, 2021
README.md Outdated Show resolved Hide resolved
@ewingjm ewingjm merged commit 738632e into master Feb 28, 2021
@ewingjm ewingjm deleted the feature/create-pull-request-with-extracted-solution branch February 28, 2021 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant