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

Improve flexibility in the way ADRs are acquired and indexed #35

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

wyrfel
Copy link

@wyrfel wyrfel commented Aug 12, 2020

Improves the way ADRs are acquired and indexed in the following ways

  • search recursively underneath the given directory
  • allow date prefixes as well as number prefixes
  • allow specification of index or date properties in frontmatter
  • fallback to auto-numbering for ADRs without filename prefixes or frontmatter
  • add -e option to specify glob pattern for files to be excluded

@wyrfel wyrfel force-pushed the feature/improve-adr-file-gathering branch 4 times, most recently from dd7be2b to 48cf736 Compare August 12, 2020 22:46
Improves the way ADRs are acquired and indexed in the following ways
- search recursively underneath the given directory
- allow date prefixes as well as number prefixes
- allow specification of `index` or `date` properties in frontmatter
- fallback to auto-numbering for ADRs without filename prefixes or frontmatter
- add -e option to specify glob pattern for files to be excluded
@wyrfel wyrfel force-pushed the feature/improve-adr-file-gathering branch from 48cf736 to f33cbf9 Compare August 12, 2020 22:46
@wyrfel
Copy link
Author

wyrfel commented Aug 17, 2020

Hi @koppor . Could you please evaluate if these extensions would be something you would like to merge?

@koppor
Copy link
Member

koppor commented Aug 17, 2020

Thank you for the PR. - JavaScript programming is not my main field. I wonder whether it is easy to add tests for the changes? Otherwise, I will have to manually test the changes.

In any case, would you mind to add the change description to CHANGELOG.md?

@koppor koppor merged commit 07b7acf into adr:master Oct 21, 2020
@koppor
Copy link
Member

koppor commented Oct 22, 2020

I did not test properly. Seems that it lists template.md, too. See #32 (comment).

Can you work on it to fix it?

@@ -67,9 +69,15 @@ console.log("adr log file:", adrLogFile);
console.log("adr log dir:", adrLogDir);

var headings = '';
const globPattern = '!(' + adrLogFileName.slice(0,-3) + '*).md';
const globPattern = '**/*.md';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates a change in behaviour that causes all md files to be indexed, not just those with the prefix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relates to the discussion at adr/madr#28

Another thing: Could you try log4brain's adr command? I am short of time currently, but the project seems promising. I am thinking of stopping this project and to recommend that one. WDYT?

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

Successfully merging this pull request may close these issues.

3 participants