Skip to content

Commit 5956c32

Browse files
committed
Cleanedup boilerplate
0 parents  commit 5956c32

File tree

2,534 files changed

+523620
-0
lines changed

Some content is hidden

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

2,534 files changed

+523620
-0
lines changed

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
extends: [
3+
'@nextcloud'
4+
],
5+
globals: {
6+
appName: true
7+
}
8+
};

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Declare files that always have LF line endings on checkout
2+
* text eol=lf
3+
4+
# Denote all files that are truly binary and should not be modified
5+
js/* binary
6+
screenshots/* binary
7+
lib/Proto/* binary
8+
lib/TProto/* binary
9+
10+
# Files to exclude from GitHub Languages statistics
11+
*.Dockerfile linguist-vendored=true

.github/CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Submitting issues
2+
3+
### Short version
4+
5+
* The [**issue templates can be found here**][template] but be aware of the different repositories! See list below. Please always use the issue template when reporting issues.
6+
7+
### Guidelines
8+
* Please search the existing issues first, it's likely that your issue was already reported or even fixed.
9+
- Go to one of the repositories, click "issues" and type any word in the top search/command bar.
10+
- You can also filter by appending e. g. "state:open" to the search string.
11+
- More info on [search syntax within github](https://help.github.com/articles/searching-issues)
12+
* Report the issue using our [template][template], it includes all the informations we need to track down the issue.
13+
14+
If your issue appears to be a bug, and hasn't been reported, open a new issue.
15+
16+
Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.
17+
18+
[template]: https://raw.github.com/bigcat88/cloud_py_api/main/.github/ISSUE_TEMPLATE/bug_report.md
19+
20+
## Contributing to Source Code
21+
22+
Thanks for wanting to contribute source code to the Cloud_Py_API app. That's great!
23+
24+
## Translations
25+
26+
For now we don't support translations.

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: mediadc
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom:

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Have you encountered a bug or unexpected behaviour
4+
---
5+
6+
**Describe the bug**
7+
A clear and concise description of what the bug is.
8+
9+
**To Reproduce**
10+
Steps to reproduce the behavior:
11+
1. Go to '...'
12+
2. Click on '....'
13+
3. Scroll down to '....'
14+
4. See error
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots**
20+
If applicable, add screenshots to help explain your problem.
21+
22+
**Desktop (please complete the following information):**
23+
- OS [e.g. Ubuntu]
24+
- CPU [architecture x86, ARM]
25+
- Browser [e.g. chrome, firefox, safari]
26+
- Nextcloud version [e.g. 23]
27+
- Database configuration [e.g. mysql 8.0.27, without sensitive information]
28+
- Python version [e.g. 3.9.1]
29+
- Cloud_Py_API version [e.g. 0.1.0]
30+
- Cloud_Py_API config and admin settings
31+
32+
**Additional context**
33+
Add any other context about the problem here.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Documentation Issue
3+
about: Typo fix or additions to our Wiki
4+
---
5+
6+
The MediaDC Wiki is open to anyone to edit. If you find something inaccurate,
7+
missing or that can be improved, please feel free to contribute to it.
8+
9+
https://github.com/andrey18106/mediadc/wiki
10+
11+
Thank you!
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Feature Request
3+
about: Ideas for new features and improvements
4+
---
5+
6+
**Description**
7+
A clear and concise description of the new feature.
8+
9+
**Example**
10+
A simple example of the new feature in action (include PHP code, YAML config, etc.)
11+
If the new feature changes an existing feature, include a simple before/after comparison.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Support Question
3+
about: Do NOT ask here - Use the forum or Telegram chat
4+
---
5+
6+
Thanks for reporting issues back to MediaDC!
7+
8+
# DO NOT ASK QUESTIONS, USE THE FORUMS
9+
10+
We use GitHub issues only to discuss about MediaDC bugs and new features.
11+
12+
MediaDC and its extras are explained in the [wiki](https://github.com/andrey18106/mediadc/wiki).
13+
14+
For any other question or comment, please use the official Telegram support [chat](https://t.me/mediadc_support).
15+
16+
Note that quite probably your question has an answer in the [FAQ](https://github.com/andrey18106/mediadc/wiki/FAQ).
17+
18+
Thank you!

.github/ISSUE_TEMPLATE/security.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Security Issue
3+
about: Important security issue or bug
4+
---
5+
6+
⚠ PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, SEE BELOW.
7+
8+
If you have found a security issue in MediaDC, please type to one of administrators
9+
in our official Telegram support [chat](https://t.me/mediadc_support)
10+
and don't disclose it publicly until we can provide a fix for it.
11+
12+
Thank you!
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Create Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
APP_NAME: cloud_py_api
8+
9+
jobs:
10+
build_app:
11+
runs-on: ubuntu-latest
12+
name: Build and create release
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Get release info
19+
id: get_release_info
20+
run: |
21+
APP_VERSION=$(sed -n "s/<version>\(.*\)<\/version>/\\1/p" ./appinfo/info.xml | tr -d '\t')
22+
IS_NIGHTLY=$(if [[ $APP_VERSION == *"beta"* ]]; then echo "true"; else echo "false"; fi)
23+
echo "::set-output name=version::v${APP_VERSION}"
24+
echo "::set-output name=tag::v${APP_VERSION}"
25+
CHANGELOG=$(grep -oPz "(?s)##\s\[$APP_VERSION.+?(?=##\s\[|$)" ./CHANGELOG.md | tr -d '\0' | sed /^$/d | sed '1d')
26+
CHANGELOG=$(echo "$CHANGELOG" | sed '$!N;s/^###.*\n#/#/;P;D' | sed '$!N;s/^###.*\n#/#/;P;D' | sed '${/^###/d;}')
27+
if [ "$CHANGELOG" == "" ]; then
28+
echo "changelog is empty!"
29+
exit 1
30+
fi
31+
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
32+
echo "$CHANGELOG" >> $GITHUB_ENV
33+
echo "EOF" >> $GITHUB_ENV
34+
echo "IS_NIGHTLY=$IS_NIGHTLY" >> $GITHUB_ENV
35+
36+
- name: Setup Node
37+
uses: actions/setup-node@v3
38+
with:
39+
node-version: 16.x
40+
41+
- name: Build
42+
run: make
43+
44+
- name: Install Krankerl
45+
run: |
46+
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.13.0/krankerl_0.13.0_amd64.deb
47+
sudo dpkg -i krankerl_0.13.0_amd64.deb
48+
49+
- name: Package app
50+
run: krankerl package
51+
52+
- uses: actions/upload-artifact@v3
53+
with:
54+
name: tarball
55+
path: build/artifacts/${{ env.APP_NAME }}.tar.gz
56+
if-no-files-found: error
57+
58+
- name: Create release draft
59+
uses: ncipollo/[email protected]
60+
with:
61+
name: ${{ steps.get_release_info.outputs.version }}
62+
tag: ${{ steps.get_release_info.outputs.tag }}
63+
prerelease: ${{ env.IS_NIGHTLY }}
64+
commit: ${{ github.ref }}
65+
draft: true
66+
body: ${{ env.CHANGELOG }}
67+
artifacts: "build/artifacts/${{ env.APP_NAME }}.tar.gz"
68+
token: ${{ secrets.GITHUB_TOKEN }}
69+
artifactErrorsFailBuild: true

.github/workflows/lint.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: Lint
2+
3+
on:
4+
# pull_request:
5+
# branches: [main, dev]
6+
# types: [opened, reopened, edited, synchronize]
7+
# push:
8+
# branches: [dev, main]
9+
workflow_dispatch:
10+
11+
jobs:
12+
xml-lint:
13+
runs-on: ubuntu-latest
14+
name: info.xml lint
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Download xml appinfo schema
19+
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
20+
21+
- name: Lint appinfo/info.xml
22+
uses: ChristophWurst/xmllint-action@v1
23+
with:
24+
xml-file: ./appinfo/info.xml
25+
xml-schema-file: ./info.xsd
26+
27+
php-lint:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
php-versions: ["7.4", "8.0", "8.1"]
32+
33+
name: php-lint
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v3
38+
39+
- name: Set up php ${{ matrix.php-versions }}
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php-versions }}
43+
coverage: none
44+
45+
- name: Lint
46+
run: composer run lint
47+
48+
php-cs:
49+
runs-on: ubuntu-latest
50+
name: php-cs
51+
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v3
55+
56+
- name: Set up php ${{ matrix.php-versions }}
57+
uses: shivammathur/setup-php@v2
58+
with:
59+
php-version: 7.4
60+
coverage: none
61+
62+
- name: Install dependencies
63+
run: composer i
64+
65+
- name: Lint
66+
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
67+
68+
php-psalm-analysis:
69+
runs-on: ubuntu-latest
70+
strategy:
71+
matrix:
72+
php-versions: ["7.4", "8.0", "8.1"]
73+
ocp-version: ['v24.0.1']
74+
name: php-psalm-analysis
75+
76+
steps:
77+
- uses: actions/checkout@v3
78+
- name: Set up php ${{ matrix.php-versions }}
79+
uses: shivammathur/setup-php@v2
80+
with:
81+
php-version: 7.4
82+
coverage: none
83+
84+
- name: Install dependencies
85+
run: composer i
86+
87+
- name: Install nextcloud/ocp
88+
run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }}
89+
90+
- name: Run coding standards check
91+
run: composer run psalm
92+
93+
php-security-analysis:
94+
runs-on: ubuntu-latest
95+
name: security analysis
96+
steps:
97+
- uses: actions/checkout@v3
98+
with:
99+
submodules: recursive
100+
101+
- name: Psalm
102+
uses: docker://vimeo/psalm-github-actions:4.9.3
103+
with:
104+
security_analysis: true
105+
composer_ignore_platform_reqs: false
106+
report_file: results.sarif
107+
108+
- name: Upload Security Analysis results to GitHub
109+
uses: github/codeql-action/upload-sarif@v2
110+
with:
111+
sarif_file: results.sarif
112+
113+
js-eslint:
114+
runs-on: ubuntu-latest
115+
name: eslint
116+
117+
steps:
118+
- uses: actions/checkout@v3
119+
- name: Install dependencies
120+
run: npm ci
121+
122+
- name: ESLint
123+
run: npm run lint
124+
125+
stylelint:
126+
runs-on: ubuntu-latest
127+
128+
name: stylelint
129+
130+
steps:
131+
- uses: actions/checkout@v3
132+
- name: Install dependencies
133+
run: npm ci
134+
135+
- name: Lint
136+
run: npm run stylelint

0 commit comments

Comments
 (0)