Take only PRs from Hurl main repos

This commit is contained in:
Fabrice Reix 2022-12-07 09:10:05 +01:00
parent 95d45e41dc
commit 847e986957
No known key found for this signature in database
GPG Key ID: 8D3D9DBDD96B2D30
3 changed files with 10 additions and 9 deletions

View File

@ -3,7 +3,7 @@
set -eu
version=$(head -1 <CHANGELOG.md| cut -d" " -f1 | cut -d'[' -f2)
changelog=$(bin/release/changelog_extract.py "$version" <CHANGELOG.md| grep '^\* ')
changelog=$(bin/release/changelog_extract.py "$version" | grep '^\* ')
issues=$(bin/release/get_release_note.py "$version" 2>/dev/null | grep '^\* ')
if [ "$changelog" != "$issues" ]; then

View File

@ -1,11 +1,11 @@
#!/usr/bin/env python3
# cat CHANGELOG.md | bin/release/changelog_extract.py 1.8.0
# bin/release/changelog_extract.py 1.8.0
import sys
def extract(version):
def extract(changelog_file, version):
print_line = False
for line in sys.stdin.readlines():
for line in open(changelog_file).readlines():
if "CHANGELOG" in line and line.startswith("["):
if line[1:].startswith(version):
print_line = True
@ -18,11 +18,11 @@ def extract(version):
def main():
if len(sys.argv) < 2:
print("usage:")
print(" cat CHANGELOG.md | bin/release/changelog_extract.py 1.8.0")
print(" bin/release/changelog_extract.py 1.8.0")
sys.exit(1)
version = sys.argv[1]
extract(version)
extract("CHANGELOG.md", version)
if __name__ == "__main__":

View File

@ -93,6 +93,7 @@ def pulls_from_issues(issues: List[Issue]) -> List[Pull]:
saved_pull.tags.append(tag)
saved_pull.issues.append(issue.number)
else:
if pull.url.startswith("/Orange-OpenSource/hurl"):
pull.tags = issue.tags
pull.issues.append(issue.number)
pulls[pull.url] = pull