Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 4 additions & 77 deletions .github/workflows/createRelease.yaml
Original file line number Diff line number Diff line change
@@ -1,82 +1,9 @@
##############################
# Workflow: Create Release
# Version: 0.0.2
##############################

name: Create Release

name: CreateRelease
on:
workflow_dispatch:
inputs:
version:
description: 'Version number (e.g., v1.0.0). Leave blank to use the latest version from CHANGELOG.md.'
required: false
pull_request:
types:
- closed

permissions:
contents: write
types: [closed]

jobs:
create-release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Determine Version
id: determine_version
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
VERSION="${{ github.event.inputs.version }}"
else
if [ -f CHANGELOG.md ]; then
VERSION=$(grep -oP '^## \[\K[^]]+' CHANGELOG.md | head -n 1)
if [ -z "$VERSION" ]; then
echo "No versions found in CHANGELOG.md."
exit 1
fi
else
echo "CHANGELOG.md not found. Cannot determine version."
exit 1
fi
fi
[[ "$VERSION" != v* ]] && VERSION="v$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION_NO_V=${VERSION#v}" >> $GITHUB_ENV

- name: Extract Release Notes from CHANGELOG.md
id: extract_notes
if: ${{ github.event.inputs.version == '' }}
run: |
if [ -f CHANGELOG.md ]; then
awk '/## \['"${VERSION_NO_V}"'\]/{flag=1; next} /## \[/{flag=0} flag' CHANGELOG.md > release_notes.txt
if [ ! -s release_notes.txt ]; then
echo "No release notes found for version ${VERSION_NO_V} in CHANGELOG.md."
exit 1
fi
else
echo "CHANGELOG.md not found in the repository."
exit 1
fi
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
cat release_notes.txt >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Default Release Notes
if: ${{ github.event.inputs.version != '' }}
run: |
echo "RELEASE_NOTES=Release notes not provided for version ${VERSION}." >> $GITHUB_ENV

- name: Debug Release Notes
run: |
echo "Extracted Release Notes:"
echo "${RELEASE_NOTES}"

- name: Create GitHub Release
run: |
gh release create "${VERSION}" --title "${VERSION}" --notes-file release_notes.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event.pull_request.merged == true
uses: Tools4everBV/.github/.github/workflows/createRelease.yaml@main
11 changes: 11 additions & 0 deletions .github/workflows/verifyChangelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: VerifyChangelog
on:
pull_request:

permissions:
contents: write
pull-requests: write

jobs:
verify-changelog:
uses: Tools4everBV/.github/.github/workflows/verifyChangelog.yaml@main
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).

## [1.2.0] - 02-04-2026

### Added

- Added department script.
- Added retries and optimization with `sleep` to prevent timeouts.
- Added endpoint to calculate upper department of the shift.

#### Changed

- Changed `persons.ps1` with option to still use /humanresources (configuration).

## [1.1.0] - 12-02-2025

#### Changed
Expand Down
102 changes: 51 additions & 51 deletions configuration.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
[
{
"key": "Username",
"type": "input",
"defaultValue": "",
"templateOptions": {
"label": "Username",
"description": "The username to connect to the API",
"required": true
}
},
{
"key": "Password",
"type": "input",
"defaultValue": "",
"templateOptions": {
"type": "password",
"label": "ApiKey",
"description": "The password to connect to the API",
"required": true
}
},
{
"key": "BaseUrl",
"type": "input",
"defaultValue": "",
"templateOptions": {
"label": "BaseUrl",
"description": "The URL to the API.",
"required": true
}
},
{
"key": "HistoricalDays",
"type": "input",
"defaultValue": "1",
"templateOptions": {
"label": "HistoricalDays",
"description": "The number of days in the past from which the shifts will be imported.",
"required": true
}
},
{
"key": "FutureDays",
"type": "input",
"defaultValue": "2",
"templateOptions": {
"label": "FutureDays",
"description": "The number of days in the future from which the shifts will be imported.",
"required": true
}
{
"key": "Username",
"type": "input",
"defaultValue": "",
"templateOptions": {
"label": "Username",
"description": "The username to connect to the API",
"required": true
}
]
},
{
"key": "Password",
"type": "input",
"defaultValue": "",
"templateOptions": {
"type": "password",
"label": "ApiKey",
"description": "The password to connect to the API",
"required": true
}
},
{
"key": "BaseUrl",
"type": "input",
"defaultValue": "https://[customer].(test).rooster.nl/InPlanningServiceAdmin/rest/api",
"templateOptions": {
"label": "BaseUrl",
"description": "The URL to the API.",
"required": true
}
},
{
"key": "HistoricalDays",
"type": "input",
"defaultValue": "1",
"templateOptions": {
"label": "HistoricalDays",
"description": "The number of days in the past from which the shifts will be imported.",
"required": true
}
},
{
"key": "FutureDays",
"type": "input",
"defaultValue": "2",
"templateOptions": {
"label": "FutureDays",
"description": "The number of days in the future from which the shifts will be imported.",
"required": true
}
}
]
Loading
Loading