@@ -54,12 +54,42 @@ jobs:
5454
5555 - name : Check header in first line
5656 run : |
57- HEADER="repository name,author name,author login,author email,date and time,changed files,commit id,branch"
57+ # Определяем HEADER в зависимости от matrix.args
58+ case "${{ matrix.args }}" in
59+ --invites)
60+ HEADER="repository name,author name,author login,author email,date and time,changed files,commit id,branch"
61+ ;;
62+ --commits)
63+ HEADER="repository name,author name,author login,author email,date and time,changed files,commit id,branch"
64+ ;;
65+ --pull_requests)
66+ HEADER="repository name,pull request number,title,state,author login,author email,date and time,merged,changed files,additions,deletions,commits,url,branch"
67+ ;;
68+ --issues)
69+ HEADER="repository name,issue number,title,state,author login,author email,date and time,url,branch"
70+ ;;
71+ --wikis)
72+ HEADER="repository name,wiki page title,author name,author login,author email,date and time,action,url,branch"
73+ ;;
74+ --contributors)
75+ HEADER="repository name,contributor login,number of commits,additions,deletions,branch"
76+ ;;
77+ --workflow_runs)
78+ HEADER="repository name,workflow name,run id,status,conclusion,author login,author email,date and time,url,branch"
79+ ;;
80+ *)
81+ echo "Unknown ARG: '${{ matrix.args }}'"
82+ exit 1
83+ ;;
84+ esac
85+
5886 FIRST_LINE=$(head -n 1 out.csv)
5987
6088 if [[ "$FIRST_LINE" == "$HEADER"* ]]; then
61- echo "Header is valid"
89+ echo "Header is valid for ${{ matrix.args }} "
6290 else
63- echo "Header is invalid"
91+ echo "::error::Header is invalid for ${{ matrix.args }}"
92+ echo "Expected: $HEADER"
93+ echo "Actual: $FIRST_LINE"
6494 exit 1
6595 fi
0 commit comments