File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 runs-on : ubuntu-latest
99 steps :
1010 - uses : actions/checkout@v4
11- - uses : tim-actions/dco@v1
1211 with :
13- github-token : ${{ secrets.GITHUB_TOKEN }}
12+ fetch-depth : 0
13+ - name : Validate DCO sign-off in commits
14+ run : |
15+ set -euo pipefail
16+ RANGE="${{ github.event.pull_request.base.sha }}..${{ github.sha }}"
17+
18+ invalid=0
19+ while IFS= read -r sha; do
20+ [[ -z "$sha" ]] && continue
21+
22+ parent_count=$(git rev-list --parents -n1 "$sha" | wc -w)
23+ if [[ "$parent_count" -gt 2 ]]; then
24+ continue
25+ fi
26+
27+ if ! git log -1 --format=%B "$sha" | grep -qi '^Signed-off-by:'; then
28+ echo "Missing Signed-off-by in commit $sha"
29+ invalid=1
30+ fi
31+ done < <(git rev-list "$RANGE")
32+
33+ if [[ $invalid -ne 0 ]]; then
34+ exit 1
35+ fi
Original file line number Diff line number Diff line change 99 steps :
1010 - uses : actions/checkout@v4
1111 - name : Lint Dockerfile
12- run : docker run --rm -i hadolint/hadolint < .docker/Dockerfile
12+ run : docker run --rm -i hadolint/hadolint hadolint --failure-threshold error - < .docker/Dockerfile
1313 - name : Validate compose
1414 run : docker compose config > /dev/null
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ final class SubsetHtmlParser
2626 public function parse (string $ html ): array
2727 {
2828 $ dom = new DOMDocument ('1.0 ' , 'UTF-8 ' );
29- $ previousUseInternalErrors = libxml_use_internal_errors (true );
29+ $ prevLibxmlErrors = libxml_use_internal_errors (true );
3030 $ dom ->loadHTML (
3131 '<?xml encoding="utf-8" ?><body> ' . $ html . '</body> ' ,
3232 LIBXML_NOERROR | LIBXML_NOWARNING ,
3333 );
3434 libxml_clear_errors ();
35- libxml_use_internal_errors ($ previousUseInternalErrors );
35+ libxml_use_internal_errors ($ prevLibxmlErrors );
3636
3737 $ body = $ dom ->getElementsByTagName ('body ' )->item (0 );
3838 if (!$ body instanceof DOMElement) {
@@ -50,6 +50,9 @@ public function parse(string $html): array
5050 return $ nodes ;
5151 }
5252
53+ /**
54+ * @SuppressWarnings(PHPMD.CyclomaticComplexity)
55+ */
5356 private function parseDomNode (DOMNode $ node , string $ inheritedStyle ): ?Node
5457 {
5558 if ($ node instanceof DOMElement) {
Original file line number Diff line number Diff line change 11{
2+ "config" : {
3+ "allow-plugins" : {
4+ "infection/extension-installer" : true
5+ }
6+ },
27 "require" : {
38 "infection/infection" : " ^0.29"
49 }
You can’t perform that action at this time.
0 commit comments