Skip to content

Commit

Permalink
Add enhanced Clockify nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
schroedan committed Feb 27, 2024
1 parent 2a8c68b commit ea453ab
Show file tree
Hide file tree
Showing 20 changed files with 13,745 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ 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
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: npx nx affected --target=lint --parallel=3

- name: Test source code affected by changes
run: npx nx affected --target=test --configuration=ci --parallel=3
run: npx nx affected --target=test --configuration=ci --exclude=n8n-nodes --parallel=3

- name: Run build of packages affected by changes
run: npx nx affected --target=build --parallel=3
Expand Down
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/)
Empty file removed nodes/.gitkeep
Empty file.
30 changes: 30 additions & 0 deletions nodes/clockify-enhanced/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"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",
{
"ignoredDependencies": ["express", "jest-mock-extended"]
}
]
}
}
]
}
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

0 comments on commit ea453ab

Please sign in to comment.