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

Add GitHub issues navigation for IDEA #3341

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Conversation

whyoleg
Copy link
Contributor

@whyoleg whyoleg commented Nov 13, 2023

Allows to click on issue/PR numbers in VCS history and be redirected to GitHub

Example:

image

Here on screenshot we can see Git window and 3 highlighted links: #3333 and #3327 in the left panel + #3333 in the right panel. All of them are clickable and will redirect to https://github.com/Kotlin/dokka/pull/3333 or https://github.com/Kotlin/dokka/pull/3327.

Why do we need this?

This simplifies a lot following Git Blame, and so understanding of context on why one or another change were implemented (via PR comments or issue description).
In last couple of days, while investigating behaviour of CodeBlocks I've done a lot of copy-pasting of issue number to GitHub and I was tired of this :) So I've configured this for local development.

Later I've found, that it's possible to share this config via Git, like in kotlinx-coroutines: https://github.com/Kotlin/kotlinx.coroutines/blob/ecb5b3e1e3c94cf377b9b3d21a8ad455bc83f0d0/.idea/vcs.xml#L13.
PR in coroutines: Kotlin/kotlinx.coroutines#1920
And so here we are

P.S. If possible, please check, that after fetching this branch, changes are applied at your side. I have not added vcs.xml to .gitignore for a reason: it can contain other settings, which we are not interested in

@whyoleg whyoleg self-assigned this Nov 13, 2023
Copy link
Member

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

I've checked out the branch, and I can see the changes, but I haven't done any additional testing

Copy link
Contributor

@vmishenev vmishenev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not added vcs.xml to .gitignore for a reason: it can contain other settings, which we are not interested in

After VCS enabling, IDEA adds in commit:
image
I'm not sure that is convenient

@whyoleg
Copy link
Contributor Author

whyoleg commented Nov 14, 2023

Hm, may be we can commit full vcs.xml file here? Looks like it only contains submodules location with relative paths, so may be it will be fine?
WDYT?

@vmishenev
Copy link
Contributor

I think It should be ok. I have no preferences about it.

@IgnatBeresnev
Copy link
Member

Hm, may be we can commit full vcs.xml file here?

I also don't mind as long as there's no specific settings tailored for one person, but if it happens - it might be possible to add vcs.xml to .gitignore, but still commit and push the base version of it. So that it's updated when you pull, but the automatic changes in it are ignored — that would be the ideal solution

@whyoleg
Copy link
Contributor Author

whyoleg commented Nov 14, 2023

I've pushed vcs.xml with full content to the branch, so now it could merged to master.
Regarding .gitignore - I've researched a bit, and found out, that after file is committed to git repository - .gitignore doesn't work for this file anymore...
The only way to ignore changes for committed file is to do something like this: https://stackoverflow.com/a/10755704 - but this is local settings

@whyoleg whyoleg merged commit 0fd90a3 into master Nov 14, 2023
10 of 11 checks passed
@whyoleg whyoleg deleted the github-issue-navigation branch November 14, 2023 15:55
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.

3 participants