Skip to content

Commit

Permalink
Remove project cards checking
Browse files Browse the repository at this point in the history
it is no longer necessary to maintain compatibility with the old version of GitHub Projects

Signed-off-by: Tim Liu <[email protected]>
  • Loading branch information
NvTimLiu committed Dec 13, 2024
1 parent 5eb3260 commit 7cbc886
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions scripts/generate-changelog
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,14 @@ def process_changelog(resource_type: str, changelog: dict, releases: set, projec

for item in items:
if len(item["projectItems"]["nodes"]) == 0 or not item["projectItems"]["nodes"][0]['roadmap']:
# compatibility support for project API V1
if len(item['projectCards']['nodes']) == 0:
if resource_type == PULL_REQUESTS:
if '[bot]' in item['title']:
continue # skip auto-gen PR
# Obtain the version from the PR's target branch, e.g. branch-x.y --> x.y
ver = item['baseRefName'].replace('branch-', '')
project = f"{RELEASE} {ver}"
else:
continue
if resource_type == PULL_REQUESTS:
if '[bot]' in item['title']:
continue # skip auto-gen PR
# Obtain the version from the PR's target branch, e.g. branch-x.y --> x.y
ver = item['baseRefName'].replace('branch-', '')
project = f"{RELEASE} {ver}"
else:
project = item['projectCards']['nodes'][0]['project']['name']
continue
else:
ver = item["projectItems"]["nodes"][0]['roadmap']['name']
project = f"{RELEASE} {ver}"
Expand Down

0 comments on commit 7cbc886

Please sign in to comment.