sshaw / git-link

Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location
399 stars 74 forks source link

Adapt to changes in Azure interface #65

Closed r-darwish closed 4 years ago

r-darwish commented 5 years ago

The new interface of Azure requires the following changes:

sshaw commented 5 years ago

Needs to be changed already ‽

File names must start with /

Do you mean end?

line and lineEnd must be specified

So when one is linking to a single line the param's value is empty? In the current PR does it link as empty string or "nil"?

lineStartColumn and lineEndColumn

Hurmmm. Intriguing. Going to have to check these links out.

Is there a reason to not provide columns? May be a good feature (if not now then at some point).

r-darwish commented 5 years ago

Needs to be changed already ‽

Microsoft just deployed a new UI. I don't think it means that it has to be changed on a regular basis. The new parameters were there before, but they just became mandatory

Do you mean end?

No, I actually mean start. If a file in the repository called dirname/filename then it has to be specified as /dirname/filename.

So when one is linking to a single line the param's value is empty?

When using the Azure interface itself to select line N, the interface will add lineEnd=N+1. This is also what the PR does.

Is there a reason to not provide columns?

That could be nice, but since only Azure supports it I figured it would be too esoteric to bother, as it requires changing the signature of all functions (or use optional parameters)

sshaw commented 4 years ago

Needs to be changed already ‽

Microsoft just deployed a new UI. I don't think it means that it has to be changed on a regular basis. The new parameters were there before, but they just became mandatory

The old URLs still work.

Is there a reason to not provide columns?

That could be nice, but since only Azure supports it I figured it would be too esoteric to bother, as it requires changing the signature of all functions (or use optional parameters)

I think this is key feature, linking to columns. But links do work without them (using a test repo on dev.azure.com). Looks like maybe modifying git-link--get-region to return this info would be the way to go, then just adding –as you've said– an optional alist argument with provider specific info.

Either way, checkout my comment about filename. Afterwards should be good to merge.

sshaw commented 4 years ago

Great thanks! Please squash into a single commit.

r-darwish commented 4 years ago

Done. Note that Github itself supports squashing a pull request

sshaw commented 4 years ago

Squashing PRs via GitHub is a bad thing as the original SHA is lost.