Skip to content

Commit 962317e

Browse files
committed
fix: set bot user email
1 parent 64b4db8 commit 962317e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

confluence_collector.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from github import GithubIntegration
2020
from github import Auth
2121
from github import Github
22-
22+
from git import Actor
2323

2424
from model import ThreatModeling, \
2525
Link, Activities, DSOMMapplication, Settings, ThreatModelingComponent
@@ -149,8 +149,11 @@ def scrape_to_folder(scraping_config: ScrapingConfig, out_path: Path = Path('out
149149
repo = gitPullAndGetOrigin(out_path, log_verbose)
150150
files = write_output_files(collection.threat_modelings, out_path.__str__() + "/" + scraping_config.subfolder_name, scraping_config.activity_name, log_verbose)
151151

152+
author = Actor("Bot Author", environ.get('git_user_mail'))
153+
committer = Actor("Bot Committer", environ.get('git_user_mail'))
154+
152155
repo.git.add('--all')
153-
repo.index.commit("add files by collector-confluence")
156+
repo.index.commit("add files by collector-confluence", author=author, committer=committer)
154157
origin = repo.remote(name='origin')
155158
origin.push()
156159

scraping_config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ space_mapping:
66
BED: { application_name: 'bed-beats' }
77
search_label: 'threat-modeling'
88
activity_name: 'Threat Modeling'
9+
git_user_mail: 'collector-confluence@owasp.org'

0 commit comments

Comments
 (0)