GithubHelp home page GithubHelp logo

Comments (8)

Gerrit-K avatar Gerrit-K commented on May 19, 2024 1

I'm not a native speaker, is "Recently used" appropriate or should I go for something else?

Me neither ;) but it sounds fine to me.

Also, beware I can't guarantee the correctness of ordering

That's a pity, but not a dealbreaker. Having suggestions in incorrect order is still better than having none at all I guess :)

Regarding your code, I'd love to help, but that would require me to learn kotlin from scratch as well as the IntelliJ plugin framework :/ Perhaps there's another open-source plugin out there that already parses the vcs log, from which you could take some bits?

from idea-conventional-commit.

lppedd avatar lppedd commented on May 19, 2024 1

@Gerrit-K fantastic! Let me know of any issue in case.

from idea-conventional-commit.

Gerrit-K avatar Gerrit-K commented on May 19, 2024

@lppedd look awesome, thanks for picking this up!

from idea-conventional-commit.

lppedd avatar lppedd commented on May 19, 2024

@Gerrit-K No problem 😄
I'm not a native speaker, is "Recently used" appropriate or should I go for something else?

Also, beware I can't guarantee the correctness of ordering, and with that I mean even if example-one has been used before my-scope-example, the order might be inverted (platform behavior).

from idea-conventional-commit.

lppedd avatar lppedd commented on May 19, 2024

Testing the integration with VCS was somewhat successfull. The code would feel like an hack to a possible contributor so it needs to be rewritting using the right objects (the flow of the VCS log is horrible to debug).

private fun getVcsCommits(): List<VcsCommitMetadata> {
  val vcsLogManager = VcsProjectLog.getInstance(project).logManager!!
  val vcsLogData = vcsLogManager.dataManager.also {
    it.addDataPackChangeListener(MyDataPackChangeListener(it))
    it.refresh(it.roots)
  }

  queue.take()

  val vcsScopesWithTimes = mutableListOf<VcsCommitMetadata>()
  val allCommits = vcsLogData.dataPack.permanentGraph.allCommits

  vcsLogData.miniDetailsGetter.loadCommitsData(
    allCommits.map { it.id },
    vcsScopesWithTimes::add,
    ProgressManager.getInstance().progressIndicator,
  )

  return vcsScopesWithTimes
}

inner class MyDataPackChangeListener(private val vcsLogData: VcsLogData) : DataPackChangeListener {
  override fun onDataPackChange(newDataPack: DataPack) {
    vcsLogData.removeDataPackChangeListener(this)
    queue.put(Unit)
  }
}

from idea-conventional-commit.

lppedd avatar lppedd commented on May 19, 2024

@Gerrit-K oh don't worry, I post code in issues only as a sort of "backup" or remainder.

from idea-conventional-commit.

lppedd avatar lppedd commented on May 19, 2024

Implemented with commit a61f2b9.
Now there are two providers, one for recently used tokens (max 3 elements), and one for VCS-tokens (max 8 elements).

from idea-conventional-commit.

Gerrit-K avatar Gerrit-K commented on May 19, 2024

@lppedd I received the plugin update today and tested it briefly. Works great and I think this will be really helpful for our workflow in the future. Thanks again for addressing this so quickly! :)

from idea-conventional-commit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.