Comments (5)
If you can extract the range of commits you want to work on, you can manually call ght _hook -R range -r remote
.
But I guess this is not exactly what you want ;)
What would serve you best? I could add some API in front of internals, something like that?
var ght = require("github-todos").hook;
ght.diff({
"range": "1234567..1234568",
"remote": "origin"
})
.then(ght.extractTodos) // → [Todo]
.then(ght.hook) // → [[Todo], [Result]]
But a few questions arise:
- What about user interaction? Same as
_hook
or you want to intercept it to be able to answer by yourself (not so easy but doable)? - What about configuration (
.github-todos
and.github-todos-ignore
)? Need to override it or just using the files is OK?
from github-todos.
Sorry for the delay, holidays and whatnot.
Calling it from bash probably isn't ideal because I'd have to install it globally on that machine.
Basically, the flow I have to work with is as follows:
- Push changeset to CI
- CI runs tests
- If tests pass, CI pushes changeset to master
Ideally, it would run between steps 2 and 3 (if the tests pass).
For this use case, user interaction doesn't matter.
I think that API reasonable (other than, perhaps, range
could be an object that with start
and end
properties). The config files also seem reasonable for now, but I could see how it might be desirable to configure them programmatically at some point.
The more I think about it, I might be able to do a local install and setup the hook by running ./node_modules/.bin/github-todos
. Let me play around with that for a bit and I'll get back to you, but even if I get it working, I suspect there could be a use-case for decoupling the bash/githooks part from the actual github api/source code updating part.
from github-todos.
Sorry for the delay, holidays and whatnot.
My daughter is now 1 week old, oh how I forgive your delay :P
Ideally, it would run between steps 2 and 3 (if the tests pass).
For this use case, user interaction doesn't matter.
What will be missing then is an elegant way to disable user interaction. It's already packed in a separate module (lib/ask
) that could be overriden for specific usages.
Options should not be hard to pass as parameter instead of reading from file, even if it's not your main issue here.
Local install will definitely do the trick anyway if you take care of disabling all interaction (+ DRY_RUN first days he ;))
from github-todos.
Is there more work to do here? 💃
from github-todos.
I still suspect it could be useful to separate out the parse/rewrite code from the actual githook part, but I don't have a specific need at the moment, so yea, I think this can be closed.
from github-todos.
Related Issues (20)
- Error on `github-todos init` HOT 4
- Writing two TODO on subsequent lines, put them in same issue HOT 3
- Add an option to rename issue title on the fly HOT 3
- GitHub enterprise support HOT 8
- Target text file HOT 1
- github-todos can break git push on very large commits HOT 4
- /usr/bin/env: node: No such file or directory HOT 3
- Error while tryping to `github-todos auth` HOT 3
- Custom Host support HOT 6
- XDG support/customization for global config file
- Failed injecting issues HOT 4
- Repeating issues HOT 3
- Token is saved in .github-todos, which is not in .gitignore by default
- Do not create issue - Throws error
- plain export HOT 2
- Git push fails fs.js:557 HOT 3
- Gitlab issue service? HOT 2
- Unhandled rejection ReferenceError: primordials is not defined HOT 2
- Trying to get in touch regarding a security issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-todos.