Skip to content

Commit 76130fb

Browse files
Merge pull request #40 from MarcelDiessner/feature/syntaxChecking
Feature/syntax checking
2 parents 2f8c11a + de328d0 commit 76130fb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/syntaxCheckPullRequest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Check PR Katacoda Syntax
22

33
on:
44
pull_request_target:
5-
5+
branches: [ main ]
66
jobs:
77
setup-matrix:
88
runs-on: ubuntu-latest
@@ -21,12 +21,12 @@ jobs:
2121
run: |
2222
changedFiles=`node selectChangedFiles.js`
2323
echo "${changedFiles}"
24-
echo "::set-output name=all::$changedFiles"
24+
echo "::set-output name=changedFiles::$changedFiles"
2525
- name: Setup matrix combinations
2626
id: setup-matrix-combinations
2727
run: |
2828
dirs=()
29-
for changed_file in ${{ steps.changedfiles.outputs.all }}; do
29+
for changed_file in ${{ steps.changedfiles.outputs.changedFiles }}; do
3030
dir="$(echo $changed_file | cut -d/ -f1)"
3131
if [[ ! " ${dirs[@]} " =~ " ${dir} " ]]; then
3232
MATRIX_PARAMS_COMBINATIONS=$MATRIX_PARAMS_COMBINATIONS'{"tutorial": "'$dir'"},'

selectChangedFiles.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ async function selectChangedFiles() {
77
let arr = [];
88
try {
99
let get = await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/files', {
10-
owner: 'devonfw-tutorials',
10+
//owner: 'devonfw-tutorials',
11+
owner: 'MarcelDiessner',
1112
repo: 'tutorials',
1213
pull_number: pr
1314
});
1415
let files = get.data;
1516
files.forEach(file => {
1617
arr.push(file.filename)
1718
});
19+
console.log(arr);
1820
} catch(e) {
1921
throw e;
2022
}

0 commit comments

Comments
 (0)