GitLab: Option to create branch from the issue is missing - gitlab

I am trying to create a branch linked from an issue on GitLab. The option to create a branch from the issue however is missing on this particular project. I have an access level of Maintainer on this project.
The current project I'm working on:
I have checked the other project I made a few months back on which I have exactly the same access level, the option that I'm looking for is there.
My previous project (This is a different project btw, not the source of the fork)
The difference being is that the current project I am working on is a forked version of the old repo so I could keep historical branches from the previous version of the project. I also imported the issues from the previous repo to the new one. I tried to create a new test issue but I still can't see the menu.
It seems like I configured something wrong, could you please help me identify why I cannot access this menu? Any help would be appreciated.
Thanks!

After some digging, I found that this may be a current known issue on GitLab. It only happens on forked projects similar to #VonC's answer. However it doesn't show how to resolve the issue.
To resolve the issue you have to remove the project's fork relationship found on the Settings > General > Advance. If you forked the repo from another project, you should see the Remove fork relationship button there. This essentially removes the fork relationship of the project from the original repository. Once done, the Create merge request should pop-up immediately upon refreshing the page. Do note you need an Owner access to see the Remove fork relationship option.
For more details, please refer to this issue and this solution was from here.

Check first if this is similar to issue 39778 which refers to issue
I disable the button for projects which are forked.
The context in when it references (from a fork) issue from the original project.
No "Create merge request" in that case.

Related

Gitlab - create branch and merge request from issue

It used to be possible to create a branch from a gitlab issue, however this functionality is no longer there.
Does it need to be explicitly enabled somewhere?
Or is there a new way to create a branch from an issue?
This one tripped me up as well!
Per the Gitlab user documentation,
https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-new-branch-from-an-issue
The Create merge request button doesn’t display if:
A branch with the same name already exists.
A merge request already exists for this branch.
Your project has an active fork relationship.
To make this button appear, one possible workaround is to remove your
project’s fork relationship. After removal, the fork relationship
cannot be restored. This project can no longer be able to receive or
send merge requests to the source project, or other forks.
Otherwise, the button displays as indicated in the post by #Do_Nhu_Vy.
This feature is still exists. Let's see the sceenshot.

Is it possible to change action's version in github marketplace?

Given that action's versions derive from their repo's tags.
Can one change an already published version by moving the tag to another commit?
If so, it's a serious security problem.. but I can't find any source to reassure me.
Anyway, it is always possible to use commit id instead of version:)
Yes, that's possible. When a tag is moved to point to a different commit, the corresponding release becomes a draft and it disappears from the Marketplace, but it can be published again.
Notice that an action doesn't need to be published on the marketplace to be used anyway.
Moving tags is actually the official recommendation for major versions and it has been debated; that discussion mentions that versioning will improve when moving to using the GitHub Package Registry for Actions, but that hasn't happened yet and the GitHub roadmap doesn't mention it, as far as I can tell.

How to use the MRTK Spectator View Feature?

I wanted to check out the inner workings of the Spectator View feature, but I got stuck.
Checking out the Repo, Unity complains about missing the HololensForCV.dll. I didn't get very far.
I found the Microsoft HoloLensForCV repository, but could not compile it. I'm not even sure, if it did, that it will spit out the desired dll.
How do I get the branch to work?
Update:
We have migrated to a new repository with samples and better documentation, please take a look here: https://github.com/microsoft/MixedReality-SpectatorView.
==================================================
Could you please try checking out this branch:
https://github.com/microsoft/MixedRealityToolkit-Unity/tree/prerelease/2019.build.spectatorView
We have documentation for SpectatorView specifically here:
https://github.com/microsoft/MixedRealityToolkit-Unity/blob/prerelease/2019.build.spectatorView/Assets/MixedRealityToolkit.Extensions/SpectatorView/SpectatorView.md
Please give it a try, and let me know if that helped.
The feature/spectatorView branch in the Microsoft MixedRealityToolkit-Unity repo no longer has any scripts with dependencies on the dlls built out of HoloLensForCV. It may be worth checking your commit log to see if it matches with the current commit history for the feature/spectatorView.
FWIW, the main feature/spectatorView branch is undergoing a lot of refactoring/breaking changes. We forked the prerelease/2019.build.spectatorView branch so that folks could start looking at ASA localization for spectator view without having to be broken by rapid development underway in the feature branch. This prerelease only supports ASA localization for an android and HoloLens (1 or 2) device. ArUco marker and QR code based localization is in progress but not yet supported.

gitlab API - how can I create a branch from an issue

In git lab, you can create an issue, then within the issue you can create a branch. This branch is linked to the issue (I think because of the issue number at the start of the branch name), such that when you do a merge request on that branch it automatically closes the issue.
So my question is - how can you do this via the API? I can create the issue, but there is no control (as far as I can see) within the issue API to create the related branch.
Is that possible?
It would be nice to be able to create an issue with branch in one go - but I don't think that is possible?
Ok - its not perhaps the best answer, but here is what I came up with for a interim solution (in linux bash):
Raise the issue store response in cmd_resp
Extract the issue ID: echo $cmd_resp | grep -o -P '(?<=iid":).*(?=,"project_id)'.
Where the issue ID is found by looking for: iid":<ISSUE-ID>,"project_id
Create a branch with the name: <ISSUE-ID>-some-branch-name - by having the issue ID at the start of the branch name, gitlab automatically makes a relation to that issue.
So - its quite a simple approach, but it does not feel very integrated. I would still prefer to do that from the point of view of the issue.
It is not possible to create a branch related to an issue via the issues API.
However, this is in line with how RESTful APIs should be designed. If you want to create a branch, you need to make a POST request to the branches API.
POST /projects/:id/repository/branches
As you have already found out, GitLab is quite good at automatically linking issues, MRs and branches together.
For a branch to be linked to an issue, simply start the branch with the issue ID. However, usually it is enough if a merge request is linked to an issue. In my opinion, you shouldn't really be concerned with the branch. You can later access the branch via issue->MR->branch
Merge requests are linked to issues whenever a MR's description text links to an issue (e.g. #1). If you add an issue ID to the Closes statement, the issue will also be closed upon MR resolution.
Therefore, you could simply create a branch via the API, name it however you want. Then, create a MR from that issue and include Closes #1 in your MR description, where 1 is your issue ID.
Further, I would recommend using a more sophisticated REST client. You shouldn't have to parse the issue ID yourself. It is properly set as a field in the JSON response.

Unable to check into TFS and Build with Continuous Integration '

I have an Azure Web application that I checked into TFS yesterday with no issues. Upon checking in, the resource manager will inject our nuget packages and deploy if it builds successfully.
I made a few changes (added a class) and checked in today. I received this error on the build:
Here's the quote to help the future search bots:
Exit code 1 returned from process: file name 'tf', arguments 'vc unshelve Gated_xxxxxx;****** /loginType:OAuth /login:.,******** /noprompt'.
I looked into the log response, to see if I get more detail, but it says the exact same thing. I have not changed my password or username.
How can I debug this to figure out the issue?
UPDATE
To save others from the headache. The issue was that we had CI builds per project. A file from another project had snuck in as well. So I was checking in for 2 different projects on 2 different solutions (Which both go to the same TFS server). So make sure you only check in for that one project!
To save others from the headache. The issue was that we had CI builds per project. A file from another project had snuck in as well. So I was checking in for 2 different projects on 2 different solutions (Which both go to the same TFS server). So make sure you only check in for that one project!
You can receive that error as well if you try to check in a file that is in a project that is not mapped in your build definition.
Let's say that you have a file named FileA.cs that is in a project named ProjectA.csproj. If you do changes in FileA.cs and this file is included in your changes, you need to map ProjectA.csproj in the Get source step of the build definition.

Resources