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

DSL to configure IssueNavigationConfiguration #88

Open
LeafHacker opened this issue Oct 12, 2019 · 2 comments
Open

DSL to configure IssueNavigationConfiguration #88

LeafHacker opened this issue Oct 12, 2019 · 2 comments

Comments

@LeafHacker
Copy link

For example, I have the following in my vcs.xml but would like to configure it via gradle rather than unigorning .idea/vcs.xml

  <component name="IssueNavigationConfiguration">
    <option name="links">
      <list>
        <IssueNavigationLink>
          <option name="issueRegexp" value="([^/# ]+)/([^/# ]+)#([0-9]+)" />
          <option name="linkRegexp" value="https://github.com/$1/$2/issues/$3" />
        </IssueNavigationLink>
        <IssueNavigationLink>
          <option name="issueRegexp" value="/([^/# ]+)/([^/# ]+)/issues/([0-9]+)" />
          <option name="linkRegexp" value="https://github.com/$1/$2/issues/$3" />
        </IssueNavigationLink>
        <IssueNavigationLink>
          <option name="issueRegexp" value="#([0-9]+)" />
          <option name="linkRegexp" value="https://github.com/org/project/issues/$1" />
        </IssueNavigationLink>
      </list>
    </option>
  </component>
@LeafHacker
Copy link
Author

Perhaps something like:

idea.project.settings {
	issueLinks [
        /([^\/# ]+)\/([^\/# ]+)#([0-9]+)/: 'https://github.com/$1/$2/issues/$3',
        /\/([^\/# ]+)\/([^/# ]+)\/issues\/([0-9]+)/: 'https://github.com/$1/$2/issues/$3',
        /#([0-9]+)/: 'https://github.com/org/project/issues/$1'
    ]
}

or

idea.project.settings {
	issueLink(/([^\/# ]+)\/([^\/# ]+)#([0-9]+)/, 'https://github.com/$1/$2/issues/$3')
    issueLink(/\/([^\/# ]+)\/([^/# ]+)\/issues\/([0-9]+)/, 'https://github.com/$1/$2/issues/$3')
    issueLink(/#([0-9]+)/, 'https://github.com/org/project/issues/$1')
}

?

@vlsi
Copy link

vlsi commented May 6, 2020

Implementing the configuration via editorconfig might be slightly better: editorconfig/editorconfig#426 as it would be consistent across IDEs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants