unfoldingWord / tc-create-app

translationCore Create
https://create.translationcore.com/
MIT License
0 stars 5 forks source link

EPIC: Add merging functionality #1566

Closed birchamp closed 12 months ago

birchamp commented 1 year ago

1545 is a spike that informs this epic.

Pulling from master:

CleanShot 2023-04-11 at 16.26.34@2x.png

Pushing to Master:

CleanShot 2023-04-11 at 15.15.17@2x.png

Prompting for comment: CleanShot 2023-04-13 at 10.08.58.png

birchamp commented 1 year ago

@Joel-C-Johnson @abelpz Here are the mockups for merging. You'll need to find out if on "merge my work" whether you need to do: pull, save, and push to Master.

abelpz commented 1 year ago

Thanks @birchamp we'll look into it.

jincypjose commented 1 year ago

Thanks @birchamp we will take a look for gateway-edit

mandolyte commented 1 year ago

Note: in the below, the term "update" and "merge" are used in the senses that Gitea uses them. That is, "update" means to update the user branch with updates from master; "merge" means to update master with changes in the user branch.

Case 1: unsaved data In this case the user must first save (or discard) any changes before attempting to update or merge.

Case 2: user branch does not exist In this case, the user has never saved any changes and does not have a user branch. Therefore, a PR cannot be created and neither update nor merge are able to work.

Case 3: run update check The PR will be created if it doesn't exist and the updatable status will be returned.

Case 4: run merge check The PR will be created if it doesn't exist and the mergeable status will be returned.

birchamp commented 1 year ago

@mandolyte @abelpz Did we figure out if prior to pushing whether we need to do a pull from master first?

mandolyte commented 1 year ago

It isn't necessary. The merge functions will create the PR of it doesn't exist.

The only reason to update before merging is to see what changes have been committed since your branch was started.

Branches named without book id will bring in latest of all the other files and it can update the file you are working on too. But only in your branch. The app must refresh its local in memory copy. This is an app specific retirement. The merger package can't help. This is what led to issue 5 in the merger package, to help determine if the file you are working on has changed when the user branch was updated.

How that helps

On Tue, Apr 18, 2023, 9:50 AM birchamp @.***> wrote:

@mandolyte https://github.com/mandolyte @abelpz https://github.com/abelpz Did we figure out if prior to pushing whether we need to do a pull from master first?

— Reply to this email directly, view it on GitHub https://github.com/unfoldingWord/tc-create-app/issues/1566#issuecomment-1513196015, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ2ZXKOUYGQ6H6HLIDYZ7DXB2L2ZANCNFSM6AAAAAAW2YCMAY . You are receiving this because you were mentioned.Message ID: @.***>