33 Commits
v0.4.3 ... main

Author SHA1 Message Date
862382d0bf Update CI/CD tokens, formatting (#179) 2023-06-04 10:12:39 +01:00
renovate[bot]
14ed8482cd Update docker Docker tag to v24.0.2 (#178)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 21:01:07 +01:00
renovate[bot]
465370599f Update dependency sentry/sdk to v3.4.0 (#177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-22 18:52:23 +01:00
renovate[bot]
ca757019f5 Update docker Docker tag to v24.0.1 (#176)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-22 16:45:00 +01:00
renovate[bot]
ba07786819 Update docker Docker tag to v24 (#175)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-17 07:49:47 +01:00
renovate[bot]
f4a0813a9b Update docker Docker tag to v23.0.6 (#174)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-10 08:06:28 +01:00
renovate[bot]
335127481c Update docker Docker tag to v23.0.5 (#173)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-27 16:53:57 +01:00
renovate[bot]
0a0be176ce Update docker Docker tag to v23.0.4 (#172)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-18 07:28:43 +01:00
renovate[bot]
3bc49c1463 Update dependency ramsey/uuid to v4.7.4 (#171)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-16 15:54:03 +01:00
renovate[bot]
6748bc4ba4 Update docker Docker tag to v23.0.3 (#170)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-12 19:05:57 +01:00
renovate[bot]
c71241dcd7 Update actions/stale action to v8 (#168)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-04 08:37:09 +01:00
renovate[bot]
d47181cfbe Update docker Docker tag to v23.0.2 (#169)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-03 11:07:40 +01:00
renovate[bot]
a0ba3f61f4 Update dependency vlucas/phpdotenv to v5.5.0 (#167)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-16 18:41:41 +00:00
renovate[bot]
aef8acfe9f Update dependency sentry/sdk to v3.3.0 (#166)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-16 18:32:09 +00:00
renovate[bot]
fb3d3146c8 Update dependency ramsey/uuid to v4.7.3 (#165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-16 18:30:41 +00:00
renovate[bot]
ec332a519a Update dependency jumbojett/openid-connect-php to v0.9.10 (#164)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-16 18:24:59 +00:00
renovate[bot]
7fe886a278 Update docker Docker tag to v23 (#163)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-18 19:07:36 +00:00
renovate[bot]
3458601402 Update docker Docker tag to v20.10.23 (#162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-01 19:40:19 +00:00
renovate[bot]
32870cc447 Update actions/stale action to v7 (#161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-22 22:24:13 +00:00
renovate[bot]
0efe142ea0 Update docker Docker tag to v20.10.22 (#160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-17 20:33:54 +00:00
5eba9d705c Create sonar-project.properties 2022-10-21 23:59:03 +01:00
1319d59c8c Add Coverage 2022-10-21 23:57:39 +01:00
05e12dde69 Sonar: phpsecurity:S5131 2022-10-21 23:53:08 +01:00
a0035707b8 Sonar: phpsecurity:S5131 2022-10-21 23:51:31 +01:00
renovate[bot]
cdaf096965 Update docker Docker tag to v20.10.20 (#159)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-19 07:24:40 +01:00
renovate[bot]
46263f3195 Update docker Docker tag to v20.10.19 (#158)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-16 18:25:00 +01:00
renovate[bot]
3c4efa15c2 Update docker Docker tag to v20.10.18 (#156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-01 11:24:37 +01:00
renovate[bot]
a24d001d98 Update actions/stale action to v6 (#157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-01 11:22:53 +01:00
renovate[bot]
107988a5b3 Update actions/stale action to v5 (#149)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Luke Tainton <ltainton@cisco.com>
2022-04-13 14:47:09 +01:00
dependabot[bot]
ae82b926f6 ⬆️ Bump guzzlehttp/psr7 from 1.6.1 to 1.8.5 in /app (#150)
Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 1.6.1 to 1.8.5.
- [Release notes](https://github.com/guzzle/psr7/releases)
- [Changelog](https://github.com/guzzle/psr7/blob/1.8.5/CHANGELOG.md)
- [Commits](https://github.com/guzzle/psr7/compare/1.6.1...1.8.5)

---
updated-dependencies:
- dependency-name: guzzlehttp/psr7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-13 14:46:49 +01:00
renovate[bot]
b12134b1c0 Update dependency docker to v20 (#152)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-13 14:46:39 +01:00
renovate[bot]
c56e16206b Update actions/checkout action to v3 (#148)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-13 14:45:12 +01:00
Luke Tainton
06a4e56ee7 Move back to GitHub 2022-04-13 14:42:05 +01:00
21 changed files with 750 additions and 765 deletions

View File

@@ -1,14 +0,0 @@
name: Auto-create branches
on:
issues:
types: [assigned]
jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
steps:
- name: Create Issue Branch
uses: robvanderleek/create-issue-branch@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,39 +0,0 @@
name: Deploy
on:
push:
branches: main
jobs:
release-on-push:
runs-on: ubuntu-latest
outputs:
ver: ${{ steps.release.outputs.version }}
tag: ${{ steps.release.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Get Release
id: release
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: patch
- name: Check Release Output
id: rop-check
run: |
echo "Got tag name ${{ steps.release.outputs.tag_name }}"
echo "Got release version ${{ steps.release.outputs.version }}"
build:
name: GitHub Container Registry
runs-on: ubuntu-latest
needs: [prepare-data]
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
run: echo ${{ secrets.PAT }} | docker login ghcr.io -u luketainton --password-stdin
- name: Build image for GitHub Container Registry
run: docker build . --file Dockerfile --tag ghcr.io/luketainton/fhed:${{ needs.release-on-push.outputs.ver }} --tag ghcr.io/luketainton/fhed:latest
- name: Push image to GitHub Container Registry
run: |
docker push ghcr.io/luketainton/fhed:latest
docker push ghcr.io/luketainton/fhed:${{ needs.release-on-push.outputs.ver }}

View File

@@ -1,13 +0,0 @@
name: Greetings
on: [pull_request, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Welcome! Thank you for opening your first issue on FHeD. Please see the [contributing guidelines](https://github.com/luketainton/FHeD/blob/main/.github/CONTRIBUTING.md) for more information.'
pr-message: 'Thank you for opening your first pull request on FHeD! Please see the [contributing guidelines](https://github.com/luketainton/FHeD/blob/main/.github/CONTRIBUTING.md) to ensure your PR is ready for merge.'

View File

@@ -1,19 +0,0 @@
name: Stale issues and PRs
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment.'
stale-pr-message: 'This pull request has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment.'
stale-issue-label: 'status:stale'
stale-pr-label: 'status:stale'

View File

@@ -17,7 +17,7 @@ Feel free to open an issue if you have any questions.
### Code of conduct and guidelines ### Code of conduct and guidelines
First of all, we expect everyone (contributors and maintainers alike) to respect the [Code of conduct](https://github.com/luketainton/FHeD/blob/master/.github/CODE_OF_CONDUCT.md). It is not a recommendation, it is mandatory. First of all, we expect everyone (contributors and maintainers alike) to respect the [Code of conduct](https://github.com/luketainton/FHeD/blob/main/.github/CODE_OF_CONDUCT.md). It is not a recommendation, it is mandatory.
For all contributions, please respect the following guidelines: For all contributions, please respect the following guidelines:
@@ -38,6 +38,6 @@ feel free to open an issue to present your idea.
The general process to submit a contribution is as follow: The general process to submit a contribution is as follow:
1. Create your own fork of the code 1. Create your own fork of the code
2. Make you changes in a new branch in your fork (not main) 2. Make you changes in a new branch in your fork (not main)
3. Make sure to fill the [pull request](https://github.com/luketainton/FHeD/blob/master/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) properly. 3. Make sure to fill the [pull request](https://github.com/luketainton/FHeD/blob/main/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) properly.
### Happy coding :metal: ### Happy coding :metal:

View File

@@ -1,6 +1,6 @@
mode: auto mode: auto
silent: false silent: false
branchName: '${issue.number}' branchName: "${issue.number}"
branches: branches:
- label: type:feature - label: type:feature
prefix: feat- prefix: feat-

14
.github/workflows/autobranch.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: Auto-create branches
on:
issues:
types: [assigned]
jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
steps:
- name: Create Issue Branch
uses: robvanderleek/create-issue-branch@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

64
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Deploy
on:
push:
branches: [main]
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
coverage: xdebug
- name: Install dependencies with composer
run: composer update --no-ansi --no-interaction --no-progress
- name: Run tests with phpunit/phpunit
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Fix code coverage paths
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
release-on-push:
runs-on: ubuntu-latest
outputs:
ver: ${{ steps.release.outputs.version }}
tag: ${{ steps.release.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Get Release
id: release
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: patch
- name: Check Release Output
id: rop-check
run: |
echo "Got tag name ${{ steps.release.outputs.tag_name }}"
echo "Got release version ${{ steps.release.outputs.version }}"
build:
name: GitHub Container Registry
runs-on: ubuntu-latest
needs: [tests, release-on-push]
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
run: echo ${{ secrets.GHCR_ACCESS_TOKEN }} | docker login ghcr.io -u luketainton --password-stdin
- name: Build image for GitHub Container Registry
run: docker build . --file Dockerfile --tag ghcr.io/luketainton/fhed:${{ needs.release-on-push.outputs.ver }} --tag ghcr.io/luketainton/fhed:latest
- name: Push image to GitHub Container Registry
run: |
docker push ghcr.io/luketainton/fhed:latest
docker push ghcr.io/luketainton/fhed:${{ needs.release-on-push.outputs.ver }}

13
.github/workflows/greetings.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: Greetings
on: [pull_request, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Welcome! Thank you for opening your first issue on FHeD. Please see the [contributing guidelines](https://github.com/luketainton/FHeD/blob/main/.github/CONTRIBUTING.md) for more information."
pr-message: "Thank you for opening your first pull request on FHeD! Please see the [contributing guidelines](https://github.com/luketainton/FHeD/blob/main/.github/CONTRIBUTING.md) to ensure your PR is ready for merge."

18
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Stale issues and PRs
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "This issue has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment."
stale-pr-message: "This pull request has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment."
stale-issue-label: "status:stale"
stale-pr-label: "status:stale"

View File

@@ -0,0 +1,18 @@
stages:
- build
build:
stage: build
only:
- tags
image: docker:24.0.2
services:
- docker:24.0.2-dind
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:latest -t $IMAGE_TAG .
- docker build -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest .
- docker push $IMAGE_TAG
- docker push $CI_REGISTRY_IMAGE:latest

View File

@@ -1,18 +0,0 @@
stages:
- build
build:
stage: build
only:
- tags
image: docker:19.03.12
services:
- docker:19.03.12-dind
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:latest -t $IMAGE_TAG .
- docker build -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest .
- docker push $IMAGE_TAG
- docker push $CI_REGISTRY_IMAGE:latest

1257
app/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,6 +6,8 @@
$updates = get_updates($db, $request); $updates = get_updates($db, $request);
$authorised_users = get_subscribers($db, $request); $authorised_users = get_subscribers($db, $request);
$is_authorised = isAuthorised($_SESSION['uuid'], $authorised_users, $request); $is_authorised = isAuthorised($_SESSION['uuid'], $authorised_users, $request);
$rid = htmlspecialchars($_GET['rid'])
?> ?>
@@ -131,7 +133,7 @@
<div class="form-group" style="margin: 2%;"> <div class="form-group" style="margin: 2%;">
<textarea type="text" class="form-control" id="msg" name="msg" rows="3"></textarea> <textarea type="text" class="form-control" id="msg" name="msg" rows="3"></textarea>
<button type="submit" class="btn btn-primary" style="margin-top: 2%;">Submit</button> <button type="submit" class="btn btn-primary" style="margin-top: 2%;">Submit</button>
<a href="/view?rid=<?php echo($_GET['rid']); ?>" class="btn btn-danger" style="margin-top: 2%;">Cancel</a> <a href="/view?rid=<?php echo($rid); ?>" class="btn btn-danger" style="margin-top: 2%;">Cancel</a>
</div> </div>
</form> </form>
</div> </div>

View File

@@ -6,6 +6,8 @@
$updates = get_updates($db, $request); $updates = get_updates($db, $request);
$authorised_users = get_subscribers($db, $request); $authorised_users = get_subscribers($db, $request);
$is_authorised = isAuthorised($_SESSION['uuid'], $authorised_users, $request); $is_authorised = isAuthorised($_SESSION['uuid'], $authorised_users, $request);
$rid = htmlspecialchars($_GET['rid']);
?> ?>
@@ -131,7 +133,7 @@
<div class="form-group" style="margin: 2%;"> <div class="form-group" style="margin: 2%;">
<input type="file" class="form-control-file" id="file" name="file"> <input type="file" class="form-control-file" id="file" name="file">
<button type="submit" class="btn btn-primary" style="margin-top: 2%;">Submit</button> <button type="submit" class="btn btn-primary" style="margin-top: 2%;">Submit</button>
<a href="/view?rid=<?php echo($_GET['rid']); ?>" class="btn btn-danger" style="margin-top: 2%;">Cancel</a> <a href="/view?rid=<?php echo($rid); ?>" class="btn btn-danger" style="margin-top: 2%;">Cancel</a>
</div> </div>
</form> </form>
</div> </div>

12
sonar-project.properties Normal file
View File

@@ -0,0 +1,12 @@
sonar.projectKey=luketainton_FHeD
sonar.organization=luketainton
# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=FHeD
#sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8