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

Add support for @elevai/commitlint-plugin-github. #28

Closed

Conversation

danrivett
Copy link

Thanks so much for creating this GitHub Action, it inspired me to create a custom commitlint plugin to support the commit message conventions we use on our projects:

https://github.com/elevai-consulting/commitlint-github/

This has been published to npm, and so I've created this PR to add the following node dependencies so that my commitlint config file can successfully reference them from the Docker container you create in the Action:

For reference below is the error logging I got from attempting to run your Action and it couldn't resolve the packages above as expected:

Run wagoid/commitlint-github-action@v1
/usr/bin/docker run --name wagoidcommitlintgithubaction140_37b5b2 --label e87b52 --workdir /github/workspace --rm -e GITHUB_TOKEN -e INPUT_CONFIGFILE -e INPUT_FIRSTPARENT -e INPUT_FAILONWARNINGS -e INPUT_HELPURL -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/personnel-app/personnel-app":"/github/workspace" wagoid/commitlint-github-action:1.4.0
##[error]error running commitlint
Cannot find module "@elevai/commitlint-config-github" from "/github/workspace/.github/workflows"
Error: Cannot find module "@elevai/commitlint-config-github" from "/github/workspace/.github/workflows"
    at resolveId (/node_modules/@commitlint/resolve-extends/lib/index.js:89:15)
    at resolveConfig (/node_modules/@commitlint/resolve-extends/lib/index.js:72:24)
    at /node_modules/@commitlint/resolve-extends/lib/index.js:30:24
    at Array.reduce (<anonymous>)
    at loadExtends (/node_modules/@commitlint/resolve-extends/lib/index.js:28:38)
    at resolveExtends (/node_modules/@commitlint/resolve-extends/lib/index.js:15:20)
    at Object.$If_1 (/node_modules/@commitlint/load/lib/index.js:73:45)
    at Object.<anonymous> (/node_modules/@commitlint/load/lib/index.js:154:17)

Hopefully it's no problem to add these packages in as they are publicly available on npmjs.com, but let me know if you have any questions etc.

Cheers!

@wagoid
Copy link
Owner

wagoid commented Feb 22, 2020

Hi @danrivett, thank you for your contribution! Due to issue #27, I've just added support to include extra dependencies in the github action.
Since now we have this support, could you use this feature instead? It will help me to keep only the main commitlint configs included in the action, which is easier for me to maintain and also easier for you to update the version of your custom config 🚀
You can see how to include extra dependencies In this section of the readme.

@wagoid
Copy link
Owner

wagoid commented Feb 22, 2020

BTW congrats on Elevai's config and plugin! It looks great and very well documented ✍️ 🌟

@danrivett
Copy link
Author

Thanks @wagoid for the quick response, using your update to the readme I was able to get it working without you needing this PR!

So I'll close this PR off. Cheers 👍

@danrivett danrivett closed this Feb 22, 2020
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.

2 participants