Skip to content

Commit 56e918b

Browse files
committed
Pushing a minor update as v1.0.16.3 related to comment updates.
1 parent 82e2603 commit 56e918b

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## Release v1.0.16.3 (October 28th, 2024)
4+
* Only showing "updated at" for comments if the created_at and updated_at field values differ. This helps place focus on updated comments which could potentially reveal a contributor trying to hide a past comment. GitHub is kind to show an Edit history for said comments as a menu option next to the comment itself.
5+
36
## Release v1.0.16.2 (October 25th, 2024)
47
* Added validation against Null values for fields "author" and "uploader" in Releases and Assets. Special thanks to @fearcito for reporting the issue.
58

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "gitxray"
7-
version = "1.0.16.2"
7+
version = "1.0.16.3"
88
authors = [
99
{ name="Lucas Lavarello", email="llavarello@kulkan.com" },
1010
]

src/gitxray/gitxray.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def gitxray_cli():
2020
░░██████ ░░██████
2121
░░░░░░ ░░░░░░
2222
gitxray: X-Ray and analyze Github Repositories and their Contributors. Trust no one!
23-
v1.0.16.2 - Developed by Kulkan Security [www.kulkan.com] - Penetration testing by creative minds.
23+
v1.0.16.3 - Developed by Kulkan Security [www.kulkan.com] - Penetration testing by creative minds.
2424
"""+"#"*gx_definitions.SCREEN_SEPARATOR_LENGTH)
2525

2626
# Let's initialize a Gitxray context, which parses arguments and more.

src/gitxray/xrays/repository_xray.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def run(gx_context, gx_output):
4949
for cc in commit_comments:
5050
gh_reactions.categorize_reactions(cc, positive_reactions, negative_reactions, neutral_reactions)
5151
login = cc.get('user').get('login')
52-
message = f"User {login} added a comment to a Commit on [{cc.get('created_at')}], updated [{cc.get('updated_at')}]: {cc.get('html_url')}"
52+
message = (f"User {login} added a comment to a Commit on [{cc.get('created_at')}]" + (f", and then updated it on [{cc.get('updated_at')}]" if cc.get('updated_at') != cc.get('created_at') else "") + f": {cc.get('html_url')}")
5353
total_comments[login] += 1
5454
gx_output.c_log(message, rtype="comments", contributor=login)
5555

@@ -92,7 +92,7 @@ def run(gx_context, gx_output):
9292
for cc in issues_comments:
9393
gh_reactions.categorize_reactions(cc, positive_reactions, negative_reactions, neutral_reactions)
9494
login = cc.get('user').get('login')
95-
message = f"User [{login}] added a comment to an Issue on [{cc.get('created_at')}], updated [{cc.get('updated_at')}]: {cc.get('html_url')}"
95+
message = (f"User {login} added a comment to an Issue on [{cc.get('created_at')}]" + (f", and then updated it on [{cc.get('updated_at')}]" if cc.get('updated_at') != cc.get('created_at') else "") + f": {cc.get('html_url')}")
9696
total_comments[login] += 1
9797
gx_output.c_log(message, rtype="comments", contributor=login)
9898

@@ -136,7 +136,7 @@ def run(gx_context, gx_output):
136136
login = cc.get('user', {}).get('login', None)
137137
except:
138138
continue
139-
message = f"User {login} added a comment to a PR on [{cc.get('created_at')}], updated [{cc.get('updated_at')}]: {cc.get('html_url')}"
139+
message = (f"User {login} added a comment to a PR on [{cc.get('created_at')}]" + (f", and then updated it on [{cc.get('updated_at')}]" if cc.get('updated_at') != cc.get('created_at') else "") + f": {cc.get('html_url')}")
140140
total_comments[login] += 1
141141
gx_output.c_log(message, rtype="comments", contributor=login)
142142

0 commit comments

Comments
 (0)