Skip to content

Commit 2db618d

Browse files
committed
update GitHub Actions workflow: adjust upstream repository configuration and simplify PR title validation
1 parent 21b3676 commit 2db618d

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

.github/scripts/validate_pr.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
from __future__ import annotations
1515

16-
import argparse
1716
import json
1817
import os
1918
import re
@@ -55,12 +54,8 @@ def validate_title(title: str) -> List[str]:
5554
if re.match(TITLE_TASK_REGEX, title, flags=re.UNICODE | re.VERBOSE):
5655
return []
5756

58-
example_task_ru = (
59-
"[TASK] 2-12. Иванов Иван Иванович. 2341-а234. Вычисление суммы элементов вектора."
60-
)
61-
example_task_en = (
62-
"[TASK] 2-12. Ivanov Ivan Ivanovich. 2341-a234. Vector elements sum calculation."
63-
)
57+
example_task_ru = "[TASK] 2-12. Иванов Иван Иванович. 2341-а234. Вычисление суммы элементов вектора."
58+
example_task_en = "[TASK] 2-12. Ivanov Ivan Ivanovich. 2341-a234. Vector elements sum calculation."
6459
example_dev = "[DEV] Update docs for lab 2"
6560
return [
6661
"Invalid PR title.",

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ jobs:
2626
git config --global --add safe.directory '*'
2727
- name: Run pre-commit checks
2828
run: |
29-
FROM_REF="${{ github.base_ref || 'HEAD~1' }}"
30-
git fetch origin $FROM_REF:$FROM_REF || true
31-
pre-commit run --from-ref $FROM_REF --to-ref HEAD
29+
git remote add upstream https://github.com/learning-process/parallel_programming_course.git || true
30+
git fetch --no-tags upstream master:upstream/master
31+
pre-commit run --from-ref upstream/master --to-ref HEAD

0 commit comments

Comments
 (0)