seymen / git-last-commit Goto Github PK
View Code? Open in Web Editor NEWNode.js module to read last git commit information including tags and branch
License: MIT License
Node.js module to read last git commit information including tags and branch
License: MIT License
Because the commit data is parsed by splitting on a comma, any commit message that contains a comma will cause everything to be parsed in the wrong place.
Steps to repro:
foo, bar
git-last-commit
of that commit; many data fields are incorrectI am trying to get readable date from commitedOn like this:
new Date(Date.now() + +commitedOn).toISOString().slice(0, 10)
My current date is 2017-04-14 but it shows 2017-05-01.
I'm trying to deploy a bot with your repository on Heroku but when execute de command that show me the github information it give me this error this does not look like a git repo
Any idea of how can I solve it? (In localhost works fine)
According to the TypeScript handbook, specifying type declarations located at ./index.d.ts
is optional but recommended. However, features like npm's bundled type indicator require type declarations to be specified.
I wrote this tool to update changelogs with the latest git commit info, and I noticed when I install it globally, the git info seems to be coming from the global path to which it was installed to, vs the working directory of my project.
If I install it locally to the project and execute it via npm run
, then there's no problem.
Can we get an option to set the execution context of the git command to pwd()
?
I'm using git tag -a tagname -m "tag description"
to add tags. They are listed when typing git tag
. Nevertheless they don't show up when using this module. I'd expect them to be located in the object at {tags:[...]}
git version: 2.7.4
git-last-commit version: 0.2.0
I am using this repository in a TypeScript project, but I get the following error when trying to define a custom repository location: Expected 1 arguments, but got 2.ts(2554)
. I am using the code snippet defined in the README that describes how to define a custom repository location.
I'm planning to use this lib, but I need to know if it needs git installed in the machine.
Reading the code it seems that it does require, but maybe there's something behind the scenes that I'm not aware of.
Thank you in advance.
Hi!
This module isn't working properly if the commit message contains line breaks. This is what I get when the message body for the last commit is the following:
Envío de vídeos al servidor
- API para recibir solicitud de envíos.
- Script para enviar los archivos (php).
{ shortHash: '7fac2b2',
hash: '7fac2b2f2c117e4d66c0c159f0bfadeffa7cf75e',
subject: 'Envío de vídeos al servidor',
sanitizedSubject: 'Env-o-de-v-deos-al-servidor',
body: '- API para recibir solicitud de envíos.',
authoredOn: '- Script para enviar los archivos (php).',
committedOn: '',
author: { name: '1506077654', email: '1506077654' },
committer: { name: 'Iván Pérez', email: 'ivan@*****.com' },
notes: 'Iván Pérez',
branch: 'ivan@*****.com',
tags: [] }
Everything is messed up. Is there any workaround to avoid that? Thanks!!
The use of ',' as the splitCharacter means that valid input which contains commas breaks parsing.
Instead, a deep-unicode character could be used
eg.
JIRA-43543 I did this, and that. (#21483)
is parsed as
JIRA-43543 I did this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.