Skip to content

Feature/issue 56/create new output mode#73

Open
pizofreude wants to merge 28 commits into
TheDanniCraft:masterfrom
pizofreude:feature/issue-56/create-new-output-mode
Open

Feature/issue 56/create new output mode#73
pizofreude wants to merge 28 commits into
TheDanniCraft:masterfrom
pizofreude:feature/issue-56/create-new-output-mode

Conversation

@pizofreude

Copy link
Copy Markdown

🚀 Pull Request

📝 Description

This PR implements a new OUTPUT_MODE configuration that allows users to choose between three different output formats for their activity log: list (default), table, and SVG image generation.

The SVG mode addresses the core request in the issue by generating a separate image file that can be manually embedded in READMEs, avoiding commit noise for users who prefer automation repositories.

Key improvements:

  • Three flexible output modes to suit different use cases
  • Beautiful GitHub-styled SVG generation with selectable text
  • Structured table format for better readability
  • Full backward compatibility with existing workflows

Fixes #56

🧩 Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (change that causes existing functionality to not work as expected)
  • 🧹 Refactor (code cleanup without changing behavior)
  • 🧾 Documentation update
  • 🧪 Tests or CI/CD related
  • ⚙️ Other (please describe below)

📋 Checklist

  • I have read and understood the Contribution Guidelines
  • My code follows the project’s coding style
  • My commit messages follow the commit syntax
  • I have performed a self-review of my own code
  • I have commented my code where necessary
  • I have updated documentation if applicable
  • My changes generate no new warnings or errors
  • Any dependent changes have been merged and published in downstream modules
  • I have tested my actions locally (see Testing GitHub Actions with nektos/act)

💬 Other Information

🎯 Features Implemented

1. List Mode (Default)

Original numbered list format - maintains 100% backward compatibility.

2. Table Mode

Generates a clean markdown/HTML table with columns:

  • Date - Formatted as "Oct 22, 2025"
  • Event - Type of activity (Push, Star, PR, etc.)
  • Repository - Clickable link to the repo
  • Description - Full event description with emoji

Example output:

| Date | Event | Repository | Description |
|------|-------|------------|-------------|
| Oct 22, 2025 | Push | [user/repo](link) | 📝 Committed to main |
| Oct 21, 2025 | Star | [user/repo](link) | ⭐ Starred repo |

3. SVG Mode

Generates a beautiful, GitHub-styled SVG image (activity-log.svg) with:

  • 🎨 Alternating row backgrounds (white/gray)
  • 📝 Selectable text (users can copy activity)
  • 📐 Dynamic height based on event count
  • 🔤 Automatic text wrapping for long descriptions
  • 🛡️ Proper XML character escaping
  • ⚡ Professional header and footer

Users can embed it in their README:

![Activity Log](./activity-log.svg)

🧪 Testing

Comprehensive test suite added in test/ directory:

  • test/standalone.js - Quick test with mock data (verified working)
  • test/local.js - Full integration test with real GitHub API
  • test/README.md - Complete testing documentation
  • .github/workflows/test-*.yml - Workflow tests for each mode

Test results:

$ node test/standalone.js all
✅ Table mode test passed!
✅ SVG generated: test/output.svg
✅ List mode test passed!
🎉 Test completed successfully!

📦 Files Modified

Core Implementation (8 files):

  • action.yml - Added OUTPUT_MODE input definition
  • src/config.js - Added mode validation (list/table/svg)
  • src/utils/eventDescriptions.js - Table & SVG formatters (~150 lines)
  • src/utils/github.js - Return both formatted and raw events
  • src/utils/file.js - SVG writer + table support
  • src/index.js - Output mode routing logic
  • dist/index.js - Compiled production build
  • README.md - Complete feature documentation

Testing Infrastructure (7 files):

  • test/standalone.js, test/local.js, test/quick.js
  • test/README.md - Testing guide
  • .github/workflows/test-list.yml
  • .github/workflows/test-table.yml
  • .github/workflows/test-svg.yml

💡 Usage Examples

List Mode (default - no changes needed):

uses: TheDanniCraft/activity-log@v1
with:
  GITHUB_USERNAME: "your-username"
  GITHUB_TOKEN: ${{ secrets.TOKEN }}

Table Mode:

uses: TheDanniCraft/activity-log@v1
with:
  GITHUB_USERNAME: "your-username"
  GITHUB_TOKEN: ${{ secrets.TOKEN }}
  OUTPUT_MODE: table

SVG Mode:

uses: TheDanniCraft/activity-log@v1
with:
  GITHUB_USERNAME: "your-username"
  GITHUB_TOKEN: ${{ secrets.TOKEN }}
  OUTPUT_MODE: svg
  COMMIT_MESSAGE: "Update activity-log.svg"

🔄 Backward Compatibility

  • Zero breaking changes - default behavior unchanged
  • ✅ All existing workflows continue working
  • ✅ New parameter is optional with safe default
  • ✅ Validated extensively with test suite

📊 Implementation Details

12 Commits following Gitmoji + Conventional Commits:

b0d3a38 📝 docs: Document OUTPUT_MODE feature in README
24234c6 ♻️ refactor: Reorganize test files into test/ directory
d4e23e9 🙈 chore: Ignore test output files
60c683e 🧪 test: Add comprehensive testing suite for output modes
94db772 🔨 build: Compile source with new output mode features
4a7090c ✨ feat(core): Add output mode routing logic
3fdb63b ✨ feat(file): Add SVG file writer and table mode support
c1bcd04 ♻️ refactor(github): Return both formatted string and raw events
91d960e ✨ feat(formatter): Add SVG image generator for activity log
b4e7e11 ✨ feat(config): Add SVG output mode support
6a11475 ✨ feat(formatter): Add table formatter for events
1ec5680 ✨ feat(config): Add OUTPUT_MODE configuration option

📸 Visual Preview

SVG Output Example:
The generated SVG includes:

  • Clean header with "Recent Activity" title
  • Numbered list of activities with emojis
  • Professional GitHub-style card design
  • Responsive layout (900px width, dynamic height)
  • Subtle shadows and borders
  • Alternating row colors for readability

test-output

Add support for output mode configuration to allow users to choose between list and table formats.
This adds the necessary input parameter and validation logic following the project's existing patterns.
Implement formatEventsAsTable function to generate markdown and HTML table formats.
The formatter supports both output styles and properly escapes special characters to prevent table formatting issues.
Extend OUTPUT_MODE configuration to accept 'svg' mode in addition to 'list' and 'table'.
This enables generating SVG image files as an alternative output format.
Implement formatEventsAsSVG function to generate a clean, GitHub-styled SVG image.
Features include:
- Card-based design with alternating row backgrounds
- Selectable text rendering
- Proper text wrapping for long descriptions
- Date formatting and event numbering
- Responsive layout with automatic height calculation
- XML escaping for safe rendering
Modify fetchAndFilterEvents to return an object containing both the formatted string
(for backward compatibility) and raw event data (for new output modes like SVG).
This allows different formatters to access the original event data.
Implement writeSvgFile function to generate and commit SVG files.
Add formatActivity helper to route between list and table modes.
The SVG writer follows the same patterns as updateReadme with:
- Change detection to avoid unnecessary commits
- Dry run support
- Proper Git commit with github-actions[bot] author
Update main entry point to route between README updates and SVG generation based on OUTPUT_MODE.
Add informative logging to show processing status and mode selection.
This completes the integration of all three output modes: list, table, and svg.
Rebuild dist/index.js with all new features including:
- Table output mode support
- SVG generation functionality
- Enhanced output mode routing
- Updated event formatting utilities
Add test workflows and standalone test scripts for validating all three output modes:
- GitHub Actions workflows for local testing with act
- Standalone Node.js test script with mock data
- Comprehensive testing documentation in TESTING.md
- Test scripts support list, table, and SVG modes
Add test-output.svg to gitignore to prevent committing temporary test files.
Move all test-related files into a dedicated test/ directory following standard project structure conventions:
- test-*.js → test/*.js (remove redundant 'test-' prefix)
- TESTING.md → test/README.md
- Update paths in documentation and scripts
- Update .gitignore to reflect new test output location

This improves organization and follows common practices from Python and other ecosystems.
Add comprehensive documentation for the new OUTPUT_MODE feature:
- Add to features list
- Document all three modes (list, table, svg) in Inputs table
- Create new "Output Modes" section with:
  - Detailed descriptions for each mode
  - Usage examples with workflow snippets
  - Visual examples of output formats
  - SVG mode benefits and use cases
  - Instructions for embedding SVG in README

Addresses issue TheDanniCraft#56 documentation requirements.
@TheDanniCraft

Copy link
Copy Markdown
Owner

Really like the implementation! I don't have time to properly review it today, it's almost 1 AM for me and I really need to get some sleep. For now, I'll request a review from Copilot to get some initial feedback and keep things moving. Please make sure to double-check any suggested changes, since Copilot's reviews are AI-generated and might not always make sense.

One thing I noticed: Maybe it's just on my end, but the text in the SVG doesn't seem to be correctly aligned (it's slightly lower).

@TheDanniCraft TheDanniCraft requested a review from Copilot October 21, 2025 22:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new OUTPUT_MODE configuration that enables users to choose between three different output formats for their activity log: list (default), table, and SVG image generation. The feature addresses the need for reduced commit noise by allowing SVG files to be generated separately instead of updating READMEs directly.

Key Changes:

  • Added OUTPUT_MODE input parameter supporting list, table, and SVG formats
  • Implemented SVG generator with GitHub-styled design and dynamic height calculation
  • Enhanced fetchAndFilterEvents to return both formatted strings and raw event data
  • Full backward compatibility maintained with list mode as default

Reviewed Changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
action.yml Adds OUTPUT_MODE input definition with list/table/svg options
src/config.js Adds validation for OUTPUT_MODE parameter
src/utils/eventDescriptions.js Implements table and SVG formatters with text wrapping and XML escaping
src/utils/github.js Modifies return structure to include both formatted strings and raw events
src/utils/file.js Adds SVG file writer and table mode support with Git operations
src/index.js Implements output mode routing logic
test/*.js Adds standalone, local, and quick test scripts
test/README.md Provides comprehensive testing guide
.github/workflows/test-*.yml Adds workflow tests for each output mode
README.md Documents the new OUTPUT_MODE feature with examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/utils/eventDescriptions.js
Comment thread test/quick.js Outdated
Comment thread test/local.js Outdated
Comment thread src/utils/file.js Outdated

@TheDanniCraft TheDanniCraft left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good overall! 👌
From a code-only review, everything seems fine (I’ll test it once I’m home).

One small concern: having multiple workflows:

  • .github/workflows/test-list-mode.yml
  • .github/workflows/test-svg-mode.yml
  • .github/workflows/test-table-mode.yml

might be a bit confusing for users. It’s not immediately clear which one they should use or why there are several.
Since update-activity.yml is currently the main "reference" workflow, maybe we could clarify that in the README or turn the others into example workflows and move them into an examples/ folder to avoid confusion.

Other than that, I really like that you added tests, nice work!
Maybe also take a look at the Copilot review comments on your tests and see if any of them are worth addressing.

pizofreude added a commit to pizofreude/activity-log that referenced this pull request Oct 22, 2025
- Fix test/quick.js: use '../src/utils/eventDescriptions'
- Fix test/local.js: use '../src/index.js'
- Addresses Copilot AI feedback on PR TheDanniCraft#73
pizofreude added a commit to pizofreude/activity-log that referenced this pull request Oct 22, 2025
- Add truncation logic to wrapText() for words exceeding maxWidth
- Truncate long words to maxWidth-3 and append '...'
- Adjust SVG text alignment using rowCenterY with dominant-baseline="middle"
- Ensures proper vertical centering and prevents layout breaks
- Addresses Copilot AI and maintainer feedback on PR TheDanniCraft#73
pizofreude added a commit to pizofreude/activity-log that referenced this pull request Oct 22, 2025
…tions

- Cache normalized strings before comparison in writeSvgFile()
- Reduces duplicate regex operations from 2 to 1 per comparison
- Improves performance when checking SVG content changes
- Addresses Copilot AI performance feedback on PR TheDanniCraft#73
pizofreude added a commit to pizofreude/activity-log that referenced this pull request Oct 22, 2025
- Move .github/workflows/test-*-mode.yml to .github/workflows/examples/
- Add "Example Workflows" section in README.md referencing examples
- Update test/README.md to clarify workflows are examples
- Prevents confusion between real workflows and testing examples
- Addresses maintainer feedback on PR TheDanniCraft#73
pizofreude added a commit to pizofreude/activity-log that referenced this pull request Oct 22, 2025
- Rebuild dist/index.js with all PR TheDanniCraft#73 review fixes
- Includes: test path fixes, SVG text wrapping, performance optimization
- Generated with bun run build
- Fix test/quick.js: use '../src/utils/eventDescriptions'
- Fix test/local.js: use '../src/index.js'

Addresses Copilot AI feedback on PR TheDanniCraft#73
- Add truncation logic to wrapText() for words exceeding maxWidth
- Truncate long words to maxWidth-3 and append '...'
- Adjust SVG text alignment using rowCenterY with dominant-baseline="middle"
- Ensures proper vertical centering and prevents layout breaks

Addresses Copilot AI and maintainer feedback on PR TheDanniCraft#73
…tions

- Cache normalized strings before comparison in writeSvgFile()
- Reduces duplicate regex operations from 2 to 1 per comparison
- Improves performance when checking SVG content changes

Addresses Copilot AI performance feedback on PR TheDanniCraft#73
- Move .github/workflows/test-*-mode.yml to .github/workflows/examples/
- Add "Example Workflows" section in README.md referencing examples
- Update test/README.md to clarify workflows are examples
- Prevents confusion between real workflows and testing examples
- Add issues:write permission to commitlint workflow
- Make github-token explicit in post-comment action

Addresses maintainer feedback and CI permission issues on PR TheDanniCraft#73
- Rebuild dist/index.js with all PR TheDanniCraft#73 review fixes
- Includes: test path fixes, SVG text wrapping, performance optimization
- Includes: workflow reorganization and CI permission fixes

Generated with bun run build
@pizofreude pizofreude force-pushed the feature/issue-56/create-new-output-mode branch from 16df66a to faf6fb6 Compare October 22, 2025 17:20
@pizofreude

Copy link
Copy Markdown
Author

All fixes completed.

@TheDanniCraft TheDanniCraft requested a review from Copilot October 22, 2025 18:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/utils/eventDescriptions.js
Comment thread src/utils/eventDescriptions.js Outdated
Comment thread src/utils/file.js Outdated
Comment thread .github/workflows/commitlint.yml

@TheDanniCraft TheDanniCraft left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This looks good overall.

A few small things to wrap up:

  • Could you please check the Copilot review comments and see if there is anything worth addressing?
  • Please remove the docstrings to keep things consistent.
  • For the tests, would it make sense to turn them into proper Jest tests? That might make them easier to maintain and integrate.
  • The text alignment looks a bit off. Could you take another look at that? (see screenshot)
Image

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Updating the workflow or commitlint is out of scope for this PR. We are currently experimenting with the minimal scoping variant.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I had to do that during troubleshooting before since the PR checks didn't pass but shows zero error. I found out for perf I need to use :zap: instead of ⚡. So I've now reverted the commitlint changes. For the SVG alignment problem, I decided to simply remove the date which isn't shown anyway in Markdown output. So, it fixes the alignment problem.

- Replace two-line format (date + description) with elegant
- single-line format showing only event description.
Add quick length comparison before expensive regex operations
to avoid unnecessary string normalization on large SVG files.

Addresses Copilot review comment about performance optimization.
Replace standalone test scripts with industry-standard Jest
testing framework.

Changes:
- Add Jest as dev dependency
- Create jest.config.js with coverage settings
- Add test scripts to package.json
- Implement 26 comprehensive unit tests:
  - 21 tests for formatters (table & SVG)
  - 5 tests for config validation
- Test coverage for edge cases and error conditions

Benefits:
- Automated testing with proper assertions
- Coverage reports (aim for >80%)
- CI/CD integration ready
- Industry standard approach

All tests passing: 26 pass, 0 fail, 52 expect() calls
Reorganize test structure following Jest conventions:
- Move tests to __tests__/unit/ subdirectory
- Create comprehensive testing documentation
- Remove redundant test/ directory and standalone scripts

Structure:
  __tests__/
  ├── README.md (testing guide)
  └── unit/
      ├── config.test.js
      └── formatters.test.js

Removed:
- test/local.js (replaced by Jest)
- test/quick.js (replaced by Jest)
- test/standalone.js (replaced by Jest)
- test/README.md (moved to __tests__)

Benefits:
- Single source of truth for tests
- Industry standard Jest convention
- Clear organization (unit/ subdirectory)
- No confusion from duplicate directories
Add Jest coverage directory to gitignore.
Remove reference to deleted test/output.svg file.
Rebuild distribution bundle with:
- New single-line SVG format
- Performance optimizations
- All code review fixes applied

Distribution size: ~2.2MB (minified)
All 26 Jest tests passing
@pizofreude

pizofreude commented Oct 25, 2025

Copy link
Copy Markdown
Author

Huh, just like before, the same problem with gitmoji + conventional commit. @TheDanniCraft please fix this, it's really frustrating to troubleshoot something about gitmoji in the commit message instead of the bug in the code.
You need to add supports for:

Emoji Purpose
👥 Maintenance tasks (chore)
Performance changes

@TheDanniCraft

TheDanniCraft commented Oct 26, 2025

Copy link
Copy Markdown
Owner

@pizofreude Both 👥 and ⚡ are part of the official Gitmoji standard, but commitlint-config-gitmoji (which the ci workflow uses) hasn't added them yet. The workflow relies on that package, and there is currently no way to extend or override its emoji list via config. For now, you can ignore the CI warnings. Also, maybe it’s just on my end, but your last commits seem to include invalid emojis ( � and � )

@pizofreude

pizofreude commented Oct 26, 2025

Copy link
Copy Markdown
Author

@pizofreude Both 👥 and ⚡ are part of the official Gitmoji standard, but commitlint-config-gitmoji (which the ci workflow uses) hasn't added them yet. The workflow relies on that package, and there is currently no way to extend or override its emoji list via config. For now, you can ignore the CI warnings. Also, maybe it’s just on my end, but your last commits seem to include invalid emojis ( � and � )

That's what happen when using the emoji not supported by the commitlint-config-gitmoji. I wasted hours troubleshooting this exact bug, reviewing the code that involved me experimenting with the commitlint changes I made previously (which I already reverted on this last update), when the real problem lies with commitlint. The only workaround right now would be using :shortcode: for the unsupported emoji by commitlint-config-gitmoji. You need to highlight this in CONTRIBUTING.md. Otherwise, you'll waste hours of other contributors time having to debug this ambiguous error code:

image

@gltched-usr

gltched-usr commented Oct 26, 2025

Copy link
Copy Markdown
Contributor

@TheDanniCraft @pizofreude 👥 works for me. ⚡not. But @pizofreude, the emojis are invalid. I also get a � (Replacement Character) instead of an actual emoji. When I rebase the commit to use the actual real emojis 👥 works.

@pizofreude

pizofreude commented Oct 26, 2025

Copy link
Copy Markdown
Author

@TheDanniCraft @pizofreude 👥 works for me. ⚡not. But @pizofreude, the emojis are invalid. I also get a � (Replacement Character) instead of an actual emoji. When I rebase the commit to use the actual real emojis 👥 works.

I see some inconsistency on how the commitlint-config-gitmoji pkg handles the emoji. For me, when I copy and paste the emoji from gitmoji.dev, Both ⚡ and 👥 doesn't work. Only :shortcode: e.g. :zap: for ⚡works. Hence my recommendation to highlight this issue in CONTRIBUTING.md to use :shortcode: for emojis yet to be supported by commitlint-config-gitmoji pkg.

This is the least safe net to avoid headaches for future contributors due to ambiguous error code this bug returns. Literally the error code: Found 0 problems, 0 warnings -> Error: Process completed with exit code 1.

Cited from StackOverflow regarding the error code: "indicates that a process in a workflow, script, or container has failed, as any non-zero exit code signifies failure."

@TheDanniCraft TheDanniCraft left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@pizofreude Almost there, thanks for your contribution. The implementation looks good overall, just a few small details to address before merging.

  • Building the project creates new files. Please make sure you build your project before committing.
  • The tests are failing. I left comments on the related files.

Comment on lines +38 to +59
it('should accept table mode', () => {
mockCore.getInput.mockImplementation((name) => {
const inputs = {
'GITHUB_USERNAME': 'testuser',
'GITHUB_TOKEN': 'token123',
'OUTPUT_MODE': 'table',
'OUTPUT_STYLE': 'MARKDOWN',
'README_PATH': 'README.md',
'EVENT_LIMIT': '5',
'IGNORE_EVENTS': '[]',
'HIDE_DETAILS_ON_PRIVATE_REPOS': 'false',
'COMMIT_MESSAGE': 'test',
'EVENT_EMOJI_MAP': '',
'DRY_RUN': 'false'
};
return inputs[name] || '';
});

delete require.cache[require.resolve('../../src/config')];
const config = require('../../src/config');
expect(config.outputMode).toBe('table');
});

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This test is currently failing with the following error:

● Config Module › processOutputMode › should accept table mode                                                                                                                                    
                                                                                                                                                                                                    
    expect(received).toBe(expected) // Object.is equality

    Expected: "table"
    Received: "list"

      56 |             delete require.cache[require.resolve('../../src/config')];
      57 |             const config = require('../../src/config');
    > 58 |             expect(config.outputMode).toBe('table');
         |                                       ^
      59 |         });
      60 |
      61 |         it('should accept svg mode', () => {

      at Object.toBe (__tests__/unit/config.test.js:58:39)

expect(config.outputMode).toBe('table');
});

it('should accept svg mode', () => {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This test is currently failing with the following error:

● Config Module › processOutputMode › should accept svg mode

    expect(received).toBe(expected) // Object.is equality

    Expected: "svg"
    Received: "list"

      79 |             delete require.cache[require.resolve('../../src/config')];
      80 |             const config = require('../../src/config');
    > 81 |             expect(config.outputMode).toBe('svg');
         |                                       ^
      82 |         });
      83 |     });
      84 |

      at Object.toBe (__tests__/unit/config.test.js:81:39)

expect(config.style).toBe('MARKDOWN');
});

it('should accept HTML style', () => {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This test is currently failing with the following error:

● Config Module › processOutputStyle › should accept HTML style

    expect(received).toBe(expected) // Object.is equality

    Expected: "HTML"
    Received: "MARKDOWN"

      127 |             delete require.cache[require.resolve('../../src/config')];
      128 |             const config = require('../../src/config');
    > 129 |             expect(config.style).toBe('HTML');
          |                                  ^
      130 |         });
      131 |     });
      132 | });

      at Object.toBe (__tests__/unit/config.test.js:129:34)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The test suite is failing with the following error:

 FAIL  __tests__/unit/formatters.test.js
  ● Test suite failed to run
                                                                                                                                                                                                    
    Input required and not supplied: GITHUB_USERNAME

      153 | // Load inputs from GitHub Actions
      154 | module.exports = {
    > 155 |     username: core.getInput('GITHUB_USERNAME', { required: true }),
          |                    ^
      156 |     token: core.getInput('GITHUB_TOKEN', { required: true }),
      157 |     eventLimit: processEventLimit(core.getInput('EVENT_LIMIT')),
      158 |     style: processStyle(core.getInput('OUTPUT_STYLE')),

      at Object.getInput (node_modules/@actions/core/src/core.ts:130:11)
      at Object.getInput (src/config.js:155:20)
      at Object.require (src/utils/eventDescriptions.js:1:27)
      at Object.require (__tests__/unit/formatters.test.js:1:52)

@TheDanniCraft

Copy link
Copy Markdown
Owner

I see some inconsistency on how the commitlint-config-gitmoji pkg handles the emoji. For me, when I copy and paste the emoji from gitmoji.dev, Both ⚡ and 👥 doesn't work. Only :shortcode: e.g. :zap: for ⚡works. Hence my recommendation to highlight this issue in CONTRIBUTING.md to use :shortcode: for emojis yet to be supported by commitlint-config-gitmoji pkg.

@pizofreude I'm sorry for that, I tried copying them from gitmoji.dev as well and got the same results: 👥 worked, ⚡ did not. Using the emoji keyboard or copying it from a text file didn’t change anything either.

I'm not 100% happy with commitlint-config-gitmoji, the repo has been inactive for about 3 years, but I don't have the time right now to create a fork or my own implementation, so I decided to stick with it for the moment. I’ll consider adding a quick note to CONTRIBUTING.md mentioning that it can be buggy sometimes.

@pizofreude

pizofreude commented Oct 27, 2025

Copy link
Copy Markdown
Author

I see some inconsistency on how the commitlint-config-gitmoji pkg handles the emoji. For me, when I copy and paste the emoji from gitmoji.dev, Both ⚡ and 👥 doesn't work. Only :shortcode: e.g. :zap: for ⚡works. Hence my recommendation to highlight this issue in CONTRIBUTING.md to use :shortcode: for emojis yet to be supported by commitlint-config-gitmoji pkg.

@pizofreude I'm sorry for that, I tried copying them from gitmoji.dev as well and got the same results: 👥 worked, ⚡ did not. Using the emoji keyboard or copying it from a text file didn’t change anything either.

I'm not 100% happy with commitlint-config-gitmoji, the repo has been inactive for about 3 years, but I don't have the time right now to create a fork or my own implementation, so I decided to stick with it for the moment. I’ll consider adding a quick note to CONTRIBUTING.md mentioning that it can be buggy sometimes.

Like I mentioned before, using :shortcode: from gitmoji.dev convention solves this issue for the unsupported emojis. In the end, the :shortcode: will be automatically rendered as the required emoji. So, I really didn't see any downside in adding this as a note in the Contributing.md.
For instance: :zap: will be rendered as ⚡ without commitlint headache.

@TheDanniCraft

Copy link
Copy Markdown
Owner

@pizofreude I’ve opened PR #83 that adds a note to the CONTRIBUTORS.md file.

👉 See the section here

Is this how you’d like the notice to be worded?

@pizofreude

Copy link
Copy Markdown
Author

@pizofreude I’ve opened PR #83 that adds a note to the CONTRIBUTORS.md file.

👉 See the section here

Is this how you’d like the notice to be worded?

LGTM!

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.

[🛠️] Feature Request: Add new output mode for image (SVG), rename README_PATH to OUTPUT_PATH

4 participants