-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
Hi @ericb-summit — that would indeed solve basic use cases. Do you mind adding a test? |
README.md
Outdated
@@ -35,6 +35,7 @@ resources: | |||
* `target_branch`(string): Filter merge requests by target_branch. Default is empty string. | |||
* `source_branch`(string): Filter merge requests by source_branch. Default is empty string. | |||
* `sort` (string): Merge requests sorting order, either `asc` (default) or `desc` to reverse. | |||
* `recursive`: When set to `true`, will pull submodules. If your submodules are relative, be sure to [use a relative path](https://www.gniibe.org/memo/software/git/using-submodule.html) to avoit https/git protocol clashing issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `recursive`: When set to `true`, will pull submodules. If your submodules are relative, be sure to [use a relative path](https://www.gniibe.org/memo/software/git/using-submodule.html) to avoit https/git protocol clashing issues. | |
* `recursive`: When set to `true`, will pull submodules. If your submodules are relative, be sure to [use a relative path](https://www.gniibe.org/memo/software/git/using-submodule.html) to avoid https/git protocol clashing issues. |
Note sure everyone will understand how it works as relative submodules are not that common. Maybe rephrase and be a bit more specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the README.md, might be better
09978a5
to
2e18159
Compare
Ok so yeah I looked at the UTs. I think we can agree a model test seems unnecessary. The command test might be more practical. I looked at how the tests work, seems the HTTP git server is stubbed for purposes of fetching: the MR, a dummy repo and a dummy commit with sha "abc". To be able to stub the submodule fetch I see 2 options Feedback would be appreciated. |
Hey let's hold off on meeting this I think the submodule update needs to go after the MR fetch. I'll update it asap |
2e18159
to
fcd16b8
Compare
Ok, I made the relevant change. |
fd1b174
to
eff7140
Compare
Hello @ericb-summit, |
eff7140
to
2e18159
Compare
Sorry, I forgot this MR was from master and not a feature branch, so when I pushed my other work to master it merged back here. Let me fix it up so we just have the recursive. Now to your question: I was basically getting this error:
You will note that the fatal message appears before the
Which are unmodified from HEAD in this upstream repo. I could not explain it, as I see you put Side note: the resource should fail in case where any of the above 3 commands exit non-zero. Right now, it ignores it. I can do another PR for that. As for the SSH use case, that's easy:
The relevant branches in my repo are https://github.com/summittech-ca/gitlab-merge-request-resource/tree/feature/ssh_keys |
Given SSH authentication is not required for the recursive option to work, I would suggest to merge this PR. |
I don't know what actual problem #30 fixes that requires rewriting submodule URLs. I've been coding too long and my brain is mush. But more importantly, I don't need it. All I need is something like this PR.
Can we take in this PR so this resource can at least init + update submodules in the happy path?