Skip to content

Commit 7e3c5d7

Browse files
Merge pull request #5 from flotiq/feature/26388-plugin-repo-update
#26388 added issues templates, changelog, licens, dependabot, and version checker
2 parents bd5b336 + 256f02d commit 7e3c5d7

13 files changed

+478
-271
lines changed
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: "Bug report"
3+
about: Report reproducible software issues, so we can improve
4+
5+
---
6+
7+
Welcome to the Plugin for Custom links GitHub repo!
8+
9+
For questions related to the plugin creation process, please check out docs at https://flotiq.com/docs/panel/PluginsDevelopment/plugins/
10+
11+
For support, help, questions, requests and ideas use https://discord.gg/FwXcHnX
12+
13+
### Issue Summary
14+
15+
A summary of the issue and the browser/OS environment in which it occurs.
16+
17+
### To Reproduce
18+
19+
1. This is the first step
20+
2. This is the second step, etc.
21+
22+
Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?
23+
24+
### Technical details:
25+
26+
* Next.js Version:
27+
* Node Version:
28+
* OS:
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: "Anything else"
3+
about: "For help, support, features & ideas - please use https://discord.gg/FwXcHnX"
4+
5+
---
6+
7+
Click "Preview" for a nicer view!
8+
9+
For support, help, questions, requests and ideas use https://discord.gg/FwXcHnX
10+
11+
Alternatively, check out these resources below. Thanks!
12+
13+
- [Discord](https://discord.gg/FwXcHnX)
14+
- [Plugin Docs](https://flotiq.com/docs/panel/PluginsDevelopment/plugins/)

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: '/'
5+
schedule:
6+
interval: 'monthly'

.github/workflows/build.yml

-48
This file was deleted.

.github/workflows/changelog.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Changelog and Version
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- main
8+
9+
jobs:
10+
check-changelog:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 100
16+
- uses: flotiq/[email protected]
17+
with:
18+
changelog_file: CHANGELOG.md
19+
version_file: package.json
20+
check-changelog-plugin-manifest:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 100
26+
- uses: flotiq/[email protected]
27+
with:
28+
changelog_file: CHANGELOG.md
29+
version_file: plugin-manifest.json

.github/workflows/main.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build & Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
workflow_dispatch:
10+
11+
jobs:
12+
build-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Use Node.js 18.x
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 18.x
20+
- run: yarn
21+
- run: yarn build
22+
- name: Create tar from built plugin
23+
run: |
24+
BUILDFOLDER="dist"
25+
MANIFEST=$(find ./$BUILDFOLDER -name plugin-manifest.json)
26+
[ -z $MANIFEST ] && cp plugin-manifest $BUILDFOLDER
27+
MANIFEST="$BUILDFOLDER/plugin-manifest.json"
28+
VERSION=$(jq '.version' $MANIFEST -r)
29+
echo "version=$VERSION"
30+
mkdir -p output
31+
tar -C $BUILDFOLDER -czf output/$VERSION.tar.gz .
32+
ls -la output
33+
echo "version=$VERSION" >> $GITHUB_ENV
34+
- name: Create artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: plugin-package
38+
path: output
39+
- name: Release built plugin
40+
uses: svenstaro/upload-release-action@v2
41+
with:
42+
repo_token: ${{ secrets.GITHUB_TOKEN }}
43+
file: output/*
44+
tag: ${{ env.version }}
45+
overwrite: true
46+
file_glob: true
47+
if: github.ref == 'refs/heads/main'

.github/workflows/pull_requests.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build & Deploy to Minio
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
pull_request:
8+
9+
jobs:
10+
build-minio:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js 18.x
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 18.x
18+
- run: yarn
19+
- run: yarn build
20+
- name: Create tar from built plugin
21+
run: |
22+
BUILDFOLDER="dist"
23+
MANIFEST=$(find ./$BUILDFOLDER -name plugin-manifest.json)
24+
[ -z $MANIFEST ] && cp plugin-manifest $BUILDFOLDER
25+
MANIFEST="$BUILDFOLDER/plugin-manifest.json"
26+
VERSION=$(jq '.version' $MANIFEST -r)
27+
URL=$(jq '.url' $MANIFEST -r)
28+
echo "version=$VERSION"
29+
mkdir -p output
30+
tar -C $BUILDFOLDER -czf output/$VERSION.tar.gz .
31+
ls -la output
32+
echo "version=$VERSION" >> $GITHUB_ENV
33+
REPO_NAME="$(basename $GITHUB_REPOSITORY)"
34+
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
35+
ENTRYPOINT_NAME=$(basename $URL)
36+
ENTRYPOINT_PATH=$(find ./$BUILDFOLDER -name $ENTRYPOINT_NAME | sed "s|^./$BUILDFOLDER/||")
37+
UPLOAD_URL="$MINIO_URL/flotiq-plugins-dev/$REPO_NAME/$GITHUB_HEAD_REF/$ENTRYPOINT_PATH"
38+
echo $UPLOAD_URL
39+
tmp=$(mktemp)
40+
jq --arg upload_url "$UPLOAD_URL" '.url = $upload_url' $MANIFEST > "$tmp" && mv "$tmp" $MANIFEST
41+
env:
42+
MINIO_URL: ${{ secrets.MINIO_ENDPOINT }}
43+
- name: Minio Deploy
44+
uses: lovellfelix/minio-deploy-action@v1
45+
with:
46+
endpoint: ${{ secrets.MINIO_ENDPOINT }}
47+
access_key: ${{ secrets.MINIO_ACCESS_KEY }}
48+
secret_key: ${{ secrets.MINIO_SECRET_KEY }}
49+
bucket: 'flotiq-plugins-dev'
50+
# Optional inputs with their defaults:
51+
source_dir: 'dist'
52+
target_dir: '/${{ env.REPO_NAME }}/${{ github.head_ref }}/'
53+
- name: Create artifact
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: plugin-package
57+
path: output/${{ env.version }}.tar.gz
58+
dependabot:
59+
runs-on: ubuntu-latest
60+
if: github.actor == 'dependabot[bot]'
61+
steps:
62+
- name: Dependabot metadata
63+
id: metadata
64+
uses: dependabot/fetch-metadata@v1
65+
with:
66+
github-token: "${{ secrets.GITHUB_TOKEN }}"
67+
- name: Approve a PR
68+
run: gh pr review --approve "$PR_URL"
69+
env:
70+
PR_URL: ${{github.event.pull_request.html_url}}
71+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# CHANGELOG
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.1.0]
9+
### Added
10+
* Changelog
11+
* Issue templates
12+
* Dependabot
13+
* Collaboration section in readme
14+
* License
15+
* GitHub check actions

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Flotiq team
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Readme.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<a href="https://flotiq.com/">
2+
<img src="https://editor.flotiq.com/fonts/fq-logo.svg" alt="Flotiq logo" title="Flotiq" align="right" height="60" />
3+
</a>
4+
15
# About plugin
26

37
This plugin will display a button with a link in the content edit object. The link will be supplemented with data from the currently edited object. Thanks to this link, you will be able to easily access the preview of where the content will be used.
@@ -73,4 +77,10 @@ The plugins are built into a single `dist/index.js` file. The manifest is copied
7377

7478
1. Open Flotiq editor
7579
2. Add a new plugin and paste the URL to the hosted `plugin-manifest.json` file
76-
3. Navigate to the view that is modified by the plugin
80+
3. Navigate to the view that is modified by the plugin
81+
82+
## Collaborating
83+
84+
If you wish to talk with us about this project, feel free to hop on our [![Discord Chat](https://img.shields.io/discord/682699728454025410.svg)](https://discord.gg/FwXcHnX).
85+
86+
If you found a bug, please report it in [issues](https://github.com/flotiq/flotiq-ui-plugin-custom-links/issues).

package.json

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
{
22
"type": "module",
3+
"license": "MIT",
4+
"version": "1.1.0",
35
"scripts": {
46
"build": "node esbuild.config.js",
57
"start": "node esbuild.config.js --watch"
68
},
79
"devDependencies": {
8-
"@babel/eslint-parser": "^7.23.3",
9-
"esbuild": "^0.20.0",
10-
"esbuild-plugin-eslint": "^0.3.7",
11-
"esbuild-plugin-inline-import": "^1.0.4",
12-
"eslint": "^8.56.0",
13-
"eslint-config-prettier": "^9.1.0",
14-
"postcss": "^8.4.35",
10+
"@babel/eslint-parser": "^7.26.8",
11+
"esbuild": "^0.25.1",
12+
"esbuild-plugin-eslint": "^0.3.12",
13+
"esbuild-plugin-inline-import": "^1.1.0",
14+
"eslint": "^8.57.1",
15+
"eslint-config-prettier": "^10.1.1",
16+
"postcss": "^8.5.3",
1517
"postcss-url": "^10.1.3",
16-
"prettier": "^3.1.1"
18+
"prettier": "^3.5.3"
1719
},
1820
"dependencies": {
19-
"chalk": "^5.3.0",
21+
"chalk": "^5.4.1",
2022
"i18next": "^23.10.1",
2123
"esbuild-plugin-copy": "^2.1.1"
2224
}

plugin-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "flotiq.custom-links",
33
"name": "Custom Links",
4-
"version": "1.0.3",
4+
"version": "1.1.0",
55
"description": "This plugin will display a button with a link in the edit content object. The link will be supplemented with data from the currently edited object. Thanks to this link, you will be able to get easy access to the preview of where the content is used.",
66
"repository": "https://github.com/flotiq/flotiq-ui-plugins-custom-links",
77
"url": "https://localhost:3053/index.js",

0 commit comments

Comments
 (0)