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 enhanced Clockify nodes #9

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ updates:
- dependency-name: '@types/*'
schedule:
interval: 'weekly'

- package-ecosystem: 'npm'
directory: '/nodes/clockify-enhanced'
ignore:
- dependency-name: '@types/*'
schedule:
interval: 'weekly'

44 changes: 44 additions & 0 deletions .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish Package

on:
push:
tags:
- 'clockify-enhanced-*'

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_VERSION: 18.18.2

jobs:
publish-package:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org

- name: Restore Node.js modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-Node-Modules-V1-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-Node-Modules-V1-

- name: Install dependencies
run: npm ci

- name: Get tag
uses: little-core-labs/[email protected]
id: tag
with:
tagRegex: '(?<name>.*)-(?<version>.*)'

- name: Publish package
run: npx nx publish n8n-nodes-${{ steps.tag.outputs.name }} --ver=${{ steps.tag.outputs.version }} --tag=latest
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community
nodes documentation.

This is a mono repository with many different community nodes.
Please take a closer look at the detailed instructions for the individual nodes:

- [Enhanced Clockify community nodes](nodes/clockify-enhanced/README.md)

## Resources

- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
25 changes: 25 additions & 0 deletions nodes/clockify-enhanced/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": ["../../.eslintrc.base.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": "error"
}
}
]
}
52 changes: 52 additions & 0 deletions nodes/clockify-enhanced/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# @skriptfabrik/n8n-nodes-clockify-enhanced

[![NPM Version](https://img.shields.io/npm/v/@skriptfabrik/n8n-nodes-clockify-enhanced)](https://www.npmjs.com/package/@skriptfabrik/n8n-nodes-clockify-enhanced)
[![NPM Downloads](https://img.shields.io/npm/dt/@skriptfabrik/n8n-nodes-clockify-enhanced)](https://www.npmjs.com/package/@skriptfabrik/n8n-nodes-clockify-enhanced)

> Enhanced [Clockify](https://clockify.me/) community nodes for your [n8n](https://n8n.io/) workflows

This is an n8n community node. It lets you use [Clockify](https://clockify.me/) webhooks as trigger nodes for your n8n workflows.

Clockify is a time tracker and timesheet app for teams.

[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.

[Installation](#installation)
[Operations](#operations)
[Credentials](#credentials)
[Compatibility](#compatibility)
[Resources](#resources)

## Installation

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community
nodes documentation.

1. Go to **Settings > Community Nodes**.
2. Select **Install**.
3. Enter `@skriptfabrik/n8n-nodes-clockify-enhanced` in **Enter npm package name**.
4. Agree to the [risks](https://docs.n8n.io/integrations/community-nodes/risks/) of using community nodes: select
**I understand the risks of installing unverified code from a public source**.
5. Select **Install**.

After installing the node, you can use it like any other node. n8n displays the node in search results in the **Nodes** panel.

## Operations

It supports these operations:

- Register a webhook in the API which will call the trigger node on configured event

## Credentials

You can use the built-in [Clockify credentials](https://docs.n8n.io/integrations/builtin/credentials/clockify/) to
authenticate with Clockify.

## Compatibility

Tested against n8n version 1.0+.

## Resources

- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
- [Clockify API (v1)](https://docs.clockify.me/)
11 changes: 11 additions & 0 deletions nodes/clockify-enhanced/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-disable */
export default {
displayName: 'n8n-nodes-clockify-enhanced',
preset: '../../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/nodes/clockify-enhanced',
};
39 changes: 39 additions & 0 deletions nodes/clockify-enhanced/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "@skriptfabrik/n8n-nodes-clockify-enhanced",
"version": "0.1.0",
"description": "Enhanced Clockify community nodes for n8n",
"keywords": [
"clockify",
"n8n",
"n8n-community-node",
"n8n-community-node-package"
],
"license": "MIT",
"homepage": "https://github.com/skriptfabrik/n8n-nodes/blob/main/nodes/clockify-enhanced/README.md",
"author": {
"name": "skriptfabrik",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "git+https://github.com/skriptfabrik/n8n-nodes.git"
},
"main": "./src/index.js",
"typings": "./src/index.d.ts",
"type": "commonjs",
"n8n": {
"n8nNodesApiVersion": 1,
"credentials": [],
"nodes": [
"src/nodes/ClockifyEnhanced/ClockifyEnhancedTrigger.node.js"
]
},
"dependencies": {
"n8n-nodes-base": "^1.29.1",
"n8n-workflow": "^1.29.1",
"tslib": "^2.6.2"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}
43 changes: 43 additions & 0 deletions nodes/clockify-enhanced/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "n8n-nodes-clockify-enhanced",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nodes/clockify-enhanced/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/nodes/clockify-enhanced",
"tsConfig": "nodes/clockify-enhanced/tsconfig.lib.json",
"packageJson": "nodes/clockify-enhanced/package.json",
"main": "nodes/clockify-enhanced/src/index.ts",
"assets": [
"nodes/clockify-enhanced/src/nodes/*/*.svg",
"nodes/clockify-enhanced/src/nodes/*/*.json",
"nodes/clockify-enhanced/*.md"
]
}
},
"link": {
"executor": "nx:run-commands",
"options": {
"cwd": "dist/nodes/clockify-enhanced",
"command": "npm link --no-audit"
},
"dependsOn": ["build"]
},
"install": {
"executor": "nx:run-commands",
"options": {
"command": "node tools/scripts/install.mjs n8n-nodes-clockify-enhanced"
},
"dependsOn": ["link"]
},
"publish": {
"command": "node tools/scripts/publish.mjs n8n-nodes-clockify-enhanced {args.ver} {args.tag}",
"dependsOn": ["build"]
}
},
"tags": []
}
Loading
Loading