Skip to content

Commit a1374f0

Browse files
committed
feat: allow admin to set default channel (#19)
A MeshChat administrator now has the ability to define the default channel that a newly logged in user is placed into. This requires that the administrator set the value `default_channel` in the configuration file. Setting `default_channel` to an empty string ('') will continue using the legacy setting of 'Everything'. Signed-off-by: Gerard Hickey <[email protected]>
1 parent 8b6de2a commit a1374f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2559
-481
lines changed

.github/ISSUE_TEMPLATE/Bug Report.yml

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Bug Report
2+
description: File a bug for the MeshChat project
3+
title: "[Bug]: "
4+
labels:
5+
- bug
6+
- needs triage
7+
assignees:
8+
- hickey
9+
body:
10+
- type: markdown
11+
attributes:
12+
value: |
13+
Thank you for taking the time to create a bug report. Please
14+
attempt to fill in as much information as you are able to.
15+
- type: input
16+
id: contact
17+
attributes:
18+
label: Contact Details
19+
description: How can we get in touch with you if we need more info?
20+
placeholder: ex. [email protected]
21+
validations:
22+
required: false
23+
- type: dropdown
24+
id: version
25+
attributes:
26+
label: Version
27+
description: Version of MeshChat?
28+
options:
29+
- v1.x
30+
- v2.0 - v2.8
31+
- v2.9
32+
- v2.10
33+
- development build (include version in what happened)
34+
default: 0
35+
validations:
36+
required: true
37+
- type: dropdown
38+
id: system_type
39+
attributes:
40+
label: System Type
41+
description: What type of system is MeshChat installed on?
42+
options:
43+
- AREDN node
44+
- Linux
45+
- Unknown
46+
default: 0
47+
validations:
48+
required: true
49+
- type: textarea
50+
id: what-happened
51+
attributes:
52+
label: What happened?
53+
description: Also tell us, what did you expect to happen?
54+
placeholder: |
55+
Describe to the best of your ability what happened or what you
56+
did to trigger the problem.
57+
validations:
58+
required: true
59+
- type: textarea
60+
id: config
61+
attributes:
62+
label: MeshChat configuration
63+
description: |
64+
If you are the admin of the MeshChat instance, it is asked that
65+
you past your MeshChat configuration file between the back ticks
66+
to aid in troubleshooting.
67+
value: |
68+
```
69+
<Insert config file here>
70+
```
71+
- type: dropdown
72+
id: connection_type
73+
attributes:
74+
label: Connection type
75+
multiple: false
76+
description: |
77+
How is the node that is running the MeshChat instance connected?
78+
If you know the mesh network that the node is connected to please
79+
indicate the name of the mesh network below in the node name field.
80+
options:
81+
- Non-connected mesh network
82+
- Mesh network connected through IP tunnel
83+
- Mesh network connected through a supernode
84+
- I don't know
85+
- type: input
86+
id: node_name
87+
attributes:
88+
label: Node name
89+
description: Please specify the node name where MeshChat runs.
90+
- type: dropdown
91+
id: browsers
92+
attributes:
93+
label: What browsers are you seeing the problem on?
94+
multiple: true
95+
options:
96+
- Firefox
97+
- Chrome
98+
- Safari
99+
- Microsoft Edge
100+
- Brave
101+
- Vivialdi
102+
- Other
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Feature Request
2+
description: Looking to add an enhancement to the MeshChat project
3+
title: "[Feature]: "
4+
labels:
5+
- enhancement
6+
assignees:
7+
- hickey
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thank you for taking the time to let us know about your idea. Please
13+
attempt to fill in as much information as you are able to.
14+
- type: input
15+
id: contact
16+
attributes:
17+
label: Contact Details
18+
description: How can we get in touch with you if we need more info?
19+
placeholder: ex. [email protected]
20+
validations:
21+
required: false
22+
- type: dropdown
23+
id: enhancement_type
24+
attributes:
25+
label: Enhancement Type
26+
description: What sort of enhancement is this?
27+
options:
28+
- Graphical interface
29+
- Message formatting
30+
- File sharing
31+
- API improvements
32+
- Documentation
33+
- Installation method
34+
- Other
35+
default: 0
36+
validations:
37+
required: true
38+
- type: textarea
39+
id: description
40+
attributes:
41+
label: What is your idea or what can be improved?
42+
description: Please be descriptive so that we can better understand the enhancement.
43+
placeholder: Tell us your idea.
44+
validations:
45+
required: true
46+

.github/workflows/build-packages.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build MeshChat Packages
2+
on: push
3+
4+
jobs:
5+
calculate-version:
6+
runs-on: ubuntu-latest
7+
outputs:
8+
build_version: ${{ steps.build-version-slug.outputs.build_version }}
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
- id: build-version-slug
14+
run: |
15+
date=$(date +%Y%m%d)
16+
branch="${GITHUB_REF_NAME}"
17+
commit=$(git rev-parse --short HEAD)
18+
version="${date}-${branch}-${commit}"
19+
20+
echo "build_version=$version" >> $GITHUB_OUTPUT
21+
22+
build-meshchat-package:
23+
needs: calculate-version
24+
uses:
25+
./.github/workflows/workflow-meshchat-package.yaml
26+
with:
27+
build_version: ${{ needs.calculate-version.outputs.build_version }}
28+
build_dir: package/meshchat-ipkg
29+
30+
build-meshchat-api-package:
31+
needs: calculate-version
32+
uses:
33+
./.github/workflows/workflow-meshchat-api-package.yaml
34+
with:
35+
build_version: ${{ needs.calculate-version.outputs.build_version }}
36+
build_dir: package/meshchat-ipkg

.github/workflows/publish-docs.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Publish MeshChat Documentation
2+
on:
3+
workflow_call:
4+
inputs:
5+
build_version:
6+
required: true
7+
type: string
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: jtackaberry/luadox:latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
ref: release
19+
- run: luadox -c luadox.conf
20+
- name: Fix permissions
21+
run: |
22+
chmod -c -R +rX "_site/" | while read line; do
23+
echo "::warning title=Invalid file permissions automatically fixed::$line"
24+
done
25+
- name: Update version strings
26+
run: |
27+
find docs -type f --exec sed -i "s/%VERSION%/${{ inputs.build_version }}/" {} \;
28+
run: |
29+
echo ::group::Archive artifact
30+
tar -C "_site" \
31+
-cvf "$RUNNER_TEMP/artifact.tar" \
32+
--exclude=.git \
33+
--exclude=.github \
34+
.
35+
echo ::endgroup::
36+
- name: Upload artifact
37+
id: upload-artifact
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: github-pages
41+
path: ${{ runner.temp }}/artifact.tar
42+
retention-days: 1
43+
if-no-files-found: error
44+
45+
# Deploy job
46+
deploy:
47+
needs: build
48+
49+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
50+
permissions:
51+
pages: write # to deploy to Pages
52+
id-token: write # to verify the deployment originates from an appropriate source
53+
54+
# Deploy to the github-pages environment
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
59+
# Specify runner + deployment step
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

.github/workflows/release-meshchat.yaml

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Release MeshChat Package
2-
on:
3-
pull_request:
4-
types: [closed]
5-
branches: [release]
2+
on: workflow_dispatch
63

74
jobs:
85
create-release:
@@ -17,6 +14,7 @@ jobs:
1714
- uses: actions/checkout@v4
1815
with:
1916
fetch-depth: 0
17+
ref: release
2018
- name: git config
2119
run: |
2220
git config user.name "${GITHUB_ACTOR}"
@@ -32,15 +30,16 @@ jobs:
3230
build-meshchat-package:
3331
needs: create-release
3432
uses:
35-
./.github/workflows/build-meshchat-package.yaml
33+
./.github/workflows/workflow-meshchat-package.yaml
3634
with:
35+
ref: release
3736
build_version: ${{ needs.create-release.outputs.build_version }}
3837
build_dir: package/meshchat-ipkg
3938

4039
build-meshchat-api-package:
4140
needs: create-release
4241
uses:
43-
./.github/workflows/build-meshchat-api-package.yaml
42+
./.github/workflows/workflow-meshchat-api-package.yaml
4443
with:
4544
build_version: ${{ needs.create-release.outputs.build_version }}
4645
build_dir: package/meshchat-ipkg
@@ -70,3 +69,15 @@ jobs:
7069
done
7170
env:
7271
GITHUB_TOKEN: ${{ secrets.RELEASE_IT_TOKEN }}
72+
73+
update-documentation:
74+
runs-on: ubuntu-latest
75+
needs: create-release
76+
steps:
77+
- uses: actions/checkout@v4
78+
with:
79+
fetch-depth: 0
80+
fetch-tags: true
81+
- uses: ./.github/workflows/publish-docs.yaml
82+
with:
83+
build_version: ${{ needs.create-release.outputs.build_version }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build MeshChat API Package
2+
on:
3+
workflow_call:
4+
inputs:
5+
build_version:
6+
required: true
7+
type: string
8+
build_dir:
9+
required: true
10+
type: string
11+
ref:
12+
required: false
13+
type: string
14+
default: ${{ github.ref_name }}
15+
16+
jobs:
17+
create-meshchat-api-package:
18+
runs-on: ubuntu-latest
19+
# container:
20+
# image: registry.gitlab.com/wt0f/gitlab-runner-images/shell:latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
ref: ${{ inputs.ref }}
26+
- run: echo ${{ inputs.build_version }} > VERSION
27+
- run: package/populate-meshchat-api-fs.sh ${{ inputs.build_dir }}
28+
- run: package/update-version.sh ${{ inputs.build_dir }}
29+
- run: package/ipk-build.sh ${{ inputs.build_dir }}
30+
- id: detect-package-file
31+
run: echo "file=$(ls -1 meshchat-api_*.ipk)" >> $GITHUB_OUTPUT
32+
- run: echo "${{ steps.detect-package-file.outputs.file }}"
33+
- uses: actions/upload-artifact@v4
34+
with:
35+
name: ${{ steps.detect-package-file.outputs.file }}
36+
path: ${{ steps.detect-package-file.outputs.file }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build MeshChat Package
2+
on:
3+
workflow_call:
4+
inputs:
5+
build_version:
6+
required: true
7+
type: string
8+
build_dir:
9+
required: true
10+
type: string
11+
ref:
12+
required: false
13+
type: string
14+
default: ${{ github.ref_name }}
15+
16+
jobs:
17+
create-meshchat-package:
18+
runs-on: ubuntu-latest
19+
# container:
20+
# image: registry.gitlab.com/wt0f/gitlab-runner-images/shell:latest
21+
outputs:
22+
package_file: ${{ steps.detect-package-file.outputs.file }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
ref: ${{ inputs.ref }}
28+
# - run: info "Populating the filesystem with MeshChat files"
29+
- run: echo ${{ inputs.build_version }} > VERSION
30+
- run: package/populate-meshchat-fs.sh ${{ inputs.build_dir }}
31+
# - run: info "Updating version numbers to "
32+
- run: package/update-version.sh ${{ inputs.build_dir }}
33+
# - run: info "Packing up MeshChat files"
34+
- run: package/ipk-build.sh ${{ inputs.build_dir }}
35+
- id: detect-package-file
36+
run: echo "file=$(ls -1 meshchat_*.ipk)" >> $GITHUB_OUTPUT
37+
- run: echo "${{ steps.detect-package-file.outputs.file }}"
38+
- uses: actions/upload-artifact@v4
39+
with:
40+
name: ${{ steps.detect-package-file.outputs.file }}
41+
path: ${{ steps.detect-package-file.outputs.file }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/.markupserve_index

0 commit comments

Comments
 (0)