Giter VIP home page Giter VIP logo

klassy's People

Contributors

plastikfan avatar

Watchers

 avatar  avatar

klassy's Issues

PoShLog: crashes if the repo contains no commits

fix(poshlog): Change by checking result of any git command is null before proceeding (#<12>)

This is caused by ReadGitCommitsInRange not checking the result the result of the git log command, before prceeding:

  [PSCustomObject[]] ReadGitCommitsInRange(
    [string]$Format,
    [string]$Range,
    [string[]]$Header,
    [string]$Delim
  ) {
    Write-Debug "ReadGitCommitsInRange: RANGE: '$($Range)', FORMAT: '$($Format)'.";

    $commitContent = (git log $Range --format=$Format);
    [array]$result = $commitContent | ConvertFrom-Csv -Delimiter $Delim -Header $Header;

$commitContent could be null, so this should be checked for.

Perform analysis on the rest of the code t see if there are other similar scenarios.

Rename to Klassy

On further consideration, this module should be a generic class container. Within this module, we can define separate silos of classes that may or may not depend on one another. Looking forward, I would not want to have to define a new module every time there is a requirement for a new set of classes. Klassy should be that class repository that clients (like Loopz and Krayola) can use to define their classes.

Add ChangeLog class

scope: changeLog
change: add
type: feat
commit: feat(changeLog): Add new ChangeLog class silo (#8)

Create change-log class silo.

should process the result for running this command:

git log --decorate --format='(%h), %as, %s' --grep=<pattern>

Elizium modules use commitizen compliant commits so the subject line should look something like this:

(doc #127): Create new inline function documentation for platyPS

However, this is NOT conventional commits which are of the form

<type>[optional scope]: <description>

So the only real difference is that we insert the issue number after the <type>

so we can use either

^\(?(?<type>fix|feat|build|chore|ci|docs|doc|style|ref|perf|test)\s+(?:#(?<n>\d{1,6}))?\)?:\s(?<desc>[\w\W\s]+)$

or the commitizen format (but with this, we will allow an optional #issue-no comes after the ': '

^(?<type>fix|feat|build|chore|ci|docs|doc|style|ref|perf|test)(?:\((?<scope>[\w]+)\))?:\s(?:#(?<n>\d{1,6}))?(?<desc>[\w\W\s]+)$

types: fix, feat, build, chore, ci, docs, style, ref, perf, test

See also:

ChangeLog: minor renamings

style(changeLog): change by renaming to PoShLog #NO

Style changes

  • rename change log to PoShLog
  • rename ChangeLogSchema to PoShLogProfile
  • rename public properties on SourceControl

When you come to defining Change Log, add PoShLog isa: ChangeLog

PoShLog: Tweaks to defaults

  • Selection.Subject.Include: "^\(?(?fix|feat|build|chore|ci|docs|doc|style|ref|perf|test)\s+(?:#(?\d{1,6}))?\)?(?!)?:?\s?(?[\w\W\s]+)"
  • add default scopes (for emoji profiles only), "build": ":toolbox:", "changeLog": "isa:poshlog", "poshlog": ":scroll:", "docs": ":books:"

PoShLog.getRange fails to get the correct range when no tags specified and repo contains no Tags

this code needs a tweak:

    [PSCustomObject]$result = if ($current.Label -eq 'HEAD') {
      [string]$latest = $allTags[1].Label;

      [PSCustomObject]@{
        Range = "$($latest)..HEAD";
        From  = $latest;
        Until = 'HEAD';
      }
    }

The problem in this scenario is that is generates the range "..HEAD" which is not valid. The correct range is simpy "HEAD", which means gets all commits.

In particular this is the line at fault which makes a rash assumption:

[string]$latest = $allTags[1].Label;

Fix minor problems with undo rename operation

When swapping over the from and to, there was a problem in that the To, is only a filename/directory name, not the full path which ended up with an incorrect swap and an erroroneous Rename-Item command.

PoShLog: isa relationship to rename existing item doesn't work properly

fix(poshlog): change isa relationalship to allow for lookup entries being remapped (#<10>)

      "Scopes": {
        "?": ":lock:",
        "all": ":star:",
        "Parameter Set tools": ":postbox:",
        "pstools": "isa:Parameter Set tools",
        "poshlog": ":star:",
        "changeLog": "isa:poshlog",
        "signals": ":fireworks:"
      },

Renaming a scope entry with an isa does not work resulting in:

Scope(isa:Parameter Set toolspstools)

instead of

Scope(:postbox:Parameter Set tools)

Ensure repo with no tags is handled gracefully

If a repo contains no tags/releases, PoShLog doesnt handle gracefully. IE tag list expected as an array returns null. Make sure all empty results returned as null are handled correctly.

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.