Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 1b7ccea

Browse files
committed
Update CI
[noissue]
1 parent 0eeca68 commit 1b7ccea

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

.ci/scripts/validate_commit_message.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313

1414
import os
15+
import warnings
1516
from github import Github
1617

1718

@@ -31,7 +32,11 @@ def __check_status(issue):
3132
gi = repo.get_issue(int(issue))
3233
if gi.pull_request:
3334
sys.exit(f"Error: issue #{issue} is a pull request.")
34-
if gi.closed_at:
35+
if gi.closed_at and "cherry picked from commit" not in message:
36+
warnings.warn(
37+
"When backporting, use the -x flag to append a line that says "
38+
"'(cherry picked from commit ...)' to the original commit message."
39+
)
3540
sys.exit(f"Error: issue #{issue} is closed.")
3641

3742

@@ -43,6 +48,8 @@ def __check_changelog(issue):
4348
for match in matches:
4449
if match.suffix not in CHANGELOG_EXTS:
4550
sys.exit(f"Invalid extension for changelog entry '{match}'.")
51+
if match.suffix == ".feature" and "cherry picked from commit" in message:
52+
sys.exit(f"Can not backport '{match}' as it is a feature.")
4653

4754

4855
print("Checking commit message for {sha}.".format(sha=sha[0:7]))

.github/template_gitref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-49-g3fa3da6
1+
2021.08.26-53-g4688510

.github/workflows/nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
# * is a special character in YAML so you have to quote this string
1313
# runs at 3:00 UTC daily
1414
- cron: '00 3 * * *'
15+
workflow_dispatch:
1516

1617
jobs:
1718
test:

.github/workflows/scripts/release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def create_release_commits(repo, release_version, plugin_path):
6161
git = repo.git
6262
git.add("CHANGES.rst")
6363
git.add("CHANGES/*")
64-
git.commit("-m", f"{release_version} changelog\n\n[noissue]")
64+
git.commit("-m", f"Add changelog for {release_version}\n\n[noissue]")
6565

6666
# Second commit: release version
6767
os.system("bump2version release --allow-dirty")

0 commit comments

Comments
 (0)