You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/workflow-readme.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,11 +37,15 @@ they stay in the pull request ui. they are also only targetted on master
37
37
- npm and node
38
38
- seperate script to auto merge
39
39
40
+
## automerge-passing-minor-patch-dependabot-prs
41
+
-
42
+
40
43
# Git setup
41
44
42
45
## Pull requests
43
-
- Branch checks for master (they dont directly use Reuseable Ci Checks instead they use them via the pull_request yml, unsure why not directly available)
44
-
46
+
- Branch checks for master dont work, they don't run the workflow dispatch.
47
+
If we want these checks one solution is every check in its own yml (they dont directly use Reuseable Ci Checks instead they use them via the pull_request yml)
48
+
The individual steps also automatically pass so can see if any error at the end with the check to check all their outputs
45
49
46
50
# Notes
47
51
- doesnt run easily with nektos act due to git ref checks and calling other workflows
This readme is the repo readme, it is also used as the package readme as this is the solution for making the TELBlazor.Components package.
7
+
There is also a cicd readme in the workflow folder.
8
+
9
+
The [MVCBlazor repo ](https://github.com/TechnologyEnhancedLearning/MVCBlazor) readme has exploration of various of the choices and alternatives to what is implemented here. And the other blazor repos may
10
+
also be a useful resource when developing for this repo.
11
+
5
12
# Purpose
6
13
7
14
Progressive components, that use the server prerendering in Global Wasm Blazor to ensure that if the user has no JS they will get html. And that html can be created to have working post actions.
8
15
The render cycle will hydrate the prerender and the post actions will be overrided by services injected in the components.
9
16
It is client side so the users browser will do the work.
10
17
18
+
11
19
12
20
# Links
13
21
@@ -34,80 +42,112 @@ It is client side so the users browser will do the work.
34
42
35
43
# Set Up
36
44
37
-
## How to set up this solution locally
38
-
*Be aware wasm wwwroot appsettings are public*
39
-
- TELBlazor\TELBlazor.Components.ShowCase.E2ETests\bin\Debug\net8.0\playwright.ps1 need to be run as admin
40
-
- local hook for commits, recommended for pre commit, and pre push as can only check the commit name value post commit
45
+
## "It works on my machine"
46
+
qqqq run release first make branch for kevin
47
+
### Hi Kevin, Please rewrite or correct these steps.
48
+
- im expecting ome global node may end up not working if anything as its already set up on my machine
49
+
50
+
### Steps
51
+
52
+
#### Get the repo
53
+
1. Go to [TELBlazor Repo](https://github.com/TechnologyEnhancedLearning/TELBlazor) hit code and get the clone string
54
+
1. Clone the repo locally
55
+
1. Go to [TELBlazor Repo](https://github.com/TechnologyEnhancedLearning/TELBlazor)
56
+
- create a branch (**there is branch name checks in cicd**) so for example call it "docs-readme-setup-instructions"
- you commits will look like this "docs(readme): added detail on commit rules"
59
+
1. Fetch, and checkout your new branch locally so you can add to the readme as you go
60
+
- create commit "docs(readme): first commit"
61
+
- see [commit rules](https://github.com/TechnologyEnhancedLearning/TELBlazor/blob/master/.commitlintrc.json)
62
+
- *these rules also enable the versioning in cicd*
63
+
- Bonus dont wait for the pipeline to fail your commit names and expose your secrets: you may want to add
64
+
- gitguardian from confluence docs (follow it to the letter) [gitguardian global setup instructions](https://hee-tis.atlassian.net/wiki/spaces/TP/pages/3855253505/GitGuardian+Setup+-+Simplified+Version)
65
+
- and add a pre-commit and push hook (you need both as you cannot lint what hasnt yet been commit) you add these to your templates if you want them for every repo, or just to this repo, or you can be lazy and add them into the gitguardian hook
66
+
- ```
67
+
#### --- Commitlint Logic (force local config) ---
68
+
REPO_ROOT=$(git rev-parse --show-toplevel)
69
+
CONFIG_PATH="$REPO_ROOT/.commitlintrc.json"
70
+
echo "COMMIT_MSG_FILE is one msg behind it is only set to the commit your trying to commit after the commit succeeds so this script is one behind"
71
+
echo "so would work best in prepush template"
72
+
COMMIT_MSG_FILE="$REPO_ROOT/.git/COMMIT_EDITMSG"
73
+
74
+
# Check if the local .commitlintrc.json exists in the repository root
75
+
if [ -f "$CONFIG_PATH" ]; then
76
+
77
+
echo "✅ Local .commitlintrc.json found at: $CONFIG_PATH. Running commitlint..."
78
+
echo "⚠️ if commit lint fails in precommit its actually reading previous commit name you need to reset or squash make a new commit and change .git/COMMIT_EDITMSG to something that would pass. ⚠️"
79
+
80
+
if command -v npx &> /dev/null; then
81
+
82
+
cd "$REPO_ROOT" || exit 1
83
+
84
+
# Debug: Print the commit message file content
85
+
if [ -f "$COMMIT_MSG_FILE" ]; then
86
+
echo "Commit message content:"
87
+
cat "$COMMIT_MSG_FILE"
88
+
else
89
+
echo "❌ Commit message file not found!"
90
+
exit 1
91
+
fi
92
+
93
+
94
+
# Run commitlint, explicitly pointing to the local config and providing the commit message via stdin
echo "⚠️ npx not found. Please ensure Node.js and npm are installed to use commitlint."
128
+
# Optionally fail here
129
+
# exit 1
130
+
fi
131
+
else
132
+
echo "ℹ️ No local .commitlintrc.json found in $REPO_ROOT. Skipping commitlint."
133
+
fi
134
+
```
135
+
### Install packages
41
136
42
-
```
43
-
# --- Commitlint Logic (force local config) ---
44
-
REPO_ROOT=$(git rev-parse --show-toplevel)
45
-
CONFIG_PATH="$REPO_ROOT/.commitlintrc.json"
46
-
echo "COMMIT_MSG_FILE is one msg behind it is only set to the commit your trying to commit after the commit succeeds so this script is one behind"
47
-
echo "so would work best in prepush template"
48
-
COMMIT_MSG_FILE="$REPO_ROOT/.git/COMMIT_EDITMSG"
137
+
### Create local files
49
138
50
-
# Check if the local .commitlintrc.json exists in the repository root
51
-
if [ -f "$CONFIG_PATH" ]; then
139
+
### Set local environment variables
52
140
53
-
echo "✅ Local .commitlintrc.json found at: $CONFIG_PATH. Running commitlint..."
54
-
echo "⚠️ if commit lint fails in precommit its actually reading previous commit name you need to reset or squash make a new commit and change .git/COMMIT_EDITMSG to something that would pass. ⚠️"
141
+
### Run tests
142
+
143
+
144
+
145
+
### How to set up this solution locally
146
+
*Be aware wasm wwwroot appsettings are public*
147
+
- TELBlazor\TELBlazor.Components.ShowCase.E2ETests\bin\Debug\net8.0\playwright.ps1 need to be run as admin
148
+
- local hook for commits, recommended for pre commit, and pre push as can only check the commit name value post commit
55
149
56
-
if command -v npx &> /dev/null; then
57
-
58
-
cd "$REPO_ROOT" || exit 1
59
150
60
-
# Debug: Print the commit message file content
61
-
if [ -f "$COMMIT_MSG_FILE" ]; then
62
-
echo "Commit message content:"
63
-
cat "$COMMIT_MSG_FILE"
64
-
else
65
-
echo "❌ Commit message file not found!"
66
-
exit 1
67
-
fi
68
-
69
-
70
-
# Run commitlint, explicitly pointing to the local config and providing the commit message via stdin
0 commit comments