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

Sync all branches to Drupal.org Gitlab #1021

Closed
wants to merge 4 commits into from
Closed

Sync all branches to Drupal.org Gitlab #1021

wants to merge 4 commits into from

Conversation

rosiel
Copy link
Member

@rosiel rosiel commented May 28, 2024

GitHub Issue: Islandora/documentation#2308

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

https://github.com/Islandora/islandora-community/wiki/May-22%2C-2024

What does this Pull Request do?

Syncs all branches as they are pushed or deleted to Gitlab.

What's new?

  • Sync all branches on push.

  • Sync all branches on delete.

  • Does this change add any new dependencies? no

  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? no

  • Could this change impact execution of existing code? no

How should this be tested?

The first part was already tested by this PR: The sync-all-branches branch is on Drupal.org's gitlab.
The delete part will be tested when we merge this PR and delete the branch: the sync-all-branches branch should be deleted from Gitlab.

Documentation Status

  • Does this change existing behaviour that's currently documented? no
  • Does this change require new pages or sections of documentation? no
  • Who does this need to be documented for? no
  • Associated documentation pull request(s): ___ or documentation issue ___

Additional Notes:

Any additional information that you think would be helpful when reviewing this
PR.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora/committers

@rosiel rosiel marked this pull request as draft May 28, 2024 15:57
@rosiel
Copy link
Member Author

rosiel commented May 28, 2024

In draft, because I think this needs discussion at the Tech Call.

I just learned that unlike with Github.com, the Drupal composer package repo (that https://packages.drupal.org/8 url) does not provide access to feature branches on Drupal's Gitlab. So it's not "as easy as changing your spec from ^2.x to dev-my-feature-branch" because you also have to add a repository (probably a 'vcs' repo to the gitlab, but I haven't tested). For testing a PR, the suggested workflow is to apply a patch with Composer.

Since we can get patches from GitHub, and we are still proposing to do our work on GitHub, then I suggest that when we need feature branches locally we add a repo for GitHUB and therefore we don't need to add all branches to GitLAB.

Discuss?

@rosiel
Copy link
Member Author

rosiel commented May 28, 2024

More details: While this branch was still in draft, i created another branch on this repo, with these commits and a few more. It synced to Gitlab. However when I deleted it, the gitlab branch did not delete itself (the Action seems to have not run at all). I suspect that this is because the default branch does not include the "on: delete" part, even though the deleted branch did. But it could also imply that delete won't work - we'll have to be careful and check once we merge this if delete is also working.

@joecorall
Copy link
Member

@rosiel That action we're using to sync branches doesn't look like it'll delete branches from the remote source

So instead I wrote an action that will perform the branch cleanup. This YML will need to be in place on a given branch before it will be deleted from GitLab when deleting the branch from GitHub

@joecorall
Copy link
Member

joecorall commented May 28, 2024

Just read this

Since we can get patches from GitHub, and we are still proposing to do our work on GitHub, then I suggest that when we need feature branches locally we add a repo for GitHUB and therefore we don't need to add all branches to GitLAB.

+1

@rosiel
Copy link
Member Author

rosiel commented May 29, 2024

Wow! Thank you for writing that action! Even if we don't use it now, it may come in handy in the future. I'm still unclear if there are any benefits at the moment for syncing our feature branches.

@rosiel
Copy link
Member Author

rosiel commented May 29, 2024

Tech call: Decided not to sync feature branches to Gitlab.

@rosiel rosiel closed this May 29, 2024
@rosiel rosiel deleted the sync-all-branches branch May 29, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants