Skip to content

Commit db0aef6

Browse files
committed
Merge branch 'master' of C:\Users\User\Documents\GitHub\github_repo_commitment_calc with conflicts.
1 parent 5b710fb commit db0aef6

File tree

13 files changed

+137
-0
lines changed

13 files changed

+137
-0
lines changed

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/github_repo_commitment_calc.iml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
7.04 KB
Binary file not shown.

get_assignee_story_dont_commit.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
def get_assignee_story(github_object):
2+
repo_owner = "OSLL"
3+
repo_name = "github_repo_commitment_calc"
4+
access_token = "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"
5+
6+
url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/pulls/{github_object.number}" if type(
7+
github_object) is PullRequest.PullRequest else\
8+
f"https://api.github.com/repos/{repo_owner}/{repo_name}/issues/{github_object.number}"
9+
10+
headers = {
11+
"Authorization": f"Bearer {access_token}",
12+
"Accept": "application/vnd.github.v3+json"
13+
}
14+
15+
response = requests.get(url, headers=headers)
16+
17+
if response.status_code == 200:
18+
print(f"Получение данных: {response.reason, response.status_code, response.url}")
19+
event = response.json()
20+
print(event)
21+
creator_name = event["assignee"]["login"]
22+
print(f"Создатель последнего события: {creator_name}")
23+
else:
24+
print(f"Ошибка при получении данных: {response.reason, response.status_code, response.url}")
25+
26+
assignee_result = ""
27+
events = github_object.get_issue_events() if type(
28+
github_object) is PullRequest.PullRequest else github_object.get_events()
29+
for event in events:
30+
if event.event == "assigned" or event.event == "unassigned":
31+
date = event.created_at
32+
if event.event == "assigned":
33+
assigner = event.actor.login
34+
assignee = event.assignee.login
35+
assignee_result += f"{date}: {assigner} -> {assignee}; "
36+
else:
37+
assigner = "placeholder" # event.actor не работает (баг pygithub)
38+
assignee = event.assignee.login
39+
assignee_result += f"{date}: {assigner} -/> {assignee}; "
40+
return assignee_result

out.csv

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repository name,number,title,state,task,created at,creator name,creator email,closer name,closer email,closed at,comment body,comment created at,comment author name,comment author login,comment author email,assignee story
2+
OSLL/github_repo_commitment_calc,19,issue 8 done (assignee problem),open,,2023-06-30 11:14:46,Anton Toropygin,TheAnton1,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
3+
OSLL/github_repo_commitment_calc,18,issue 6 done,closed,,2023-06-20 22:00:41,Mark Zaslavskiy,abbadonref,Empty field,Empty field,Empty field,,2023-06-22 09:38:32,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
4+
OSLL/github_repo_commitment_calc,17,add branches in PR statistics,closed,,2023-06-19 08:03:39,Mark Zaslavskiy,TheAnton1,Empty field,Empty field,Empty field,,2023-06-20 13:43:09,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
5+
OSLL/github_repo_commitment_calc,16,���������� ���������� ������ �������� � API,open,https://docs.github.com/en/rest/search?apiVersion=2022-11-28#rate-limit,2023-06-10 13:41:23,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
6+
OSLL/github_repo_commitment_calc,15,���� �������� � ��������� �������� - ����� ���������� ������� � �����-�� ���� � �� �����-�� ����,open,,2023-06-06 09:54:33,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
7+
OSLL/github_repo_commitment_calc,14,"��������� �������� ������ ���� �� ������� - ����� ����� ��������� ����������, ������ � ��� ",open,,2023-05-31 06:46:26,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
8+
OSLL/github_repo_commitment_calc,13,added fix for git_logger.py,closed,,2022-12-28 15:06:08,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,,2022-12-28 15:06:21,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
9+
OSLL/github_repo_commitment_calc,12,��������� ������ ��� ����������� (������ � ������ �����������),open,,2022-07-15 13:38:22,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
10+
OSLL/github_repo_commitment_calc,11,������ ���� � ��������� ������������ � �������,open,"![image](https://user-images.githubusercontent.com/717575/179232873-3a9af03e-8c35-4c42-a26e-e7b1a09a6a87.png)
11+
",2022-07-15 13:29:51,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
12+
OSLL/github_repo_commitment_calc,10,����� ������������� ������ ������� + ������� ������ � ���� �������,open,,2022-07-15 13:26:08,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
13+
OSLL/github_repo_commitment_calc,9,� ���������� PR - ��������� ����� ����� (������ ����),closed,,2022-07-15 13:08:27,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,,2023-06-22 09:32:56,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
14+
OSLL/github_repo_commitment_calc,8,������� ����� assignee � issue � pr ����������,open,,2022-07-15 13:07:08,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
15+
OSLL/github_repo_commitment_calc,7,� ������� �� issues - ������ �� ��������� PR (� ��������) ,open,,2022-07-15 13:06:46,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
16+
OSLL/github_repo_commitment_calc,6,� ������ �������� - �������������� ��������,closed,,2022-07-15 13:05:12,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,,2023-06-22 09:38:42,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
17+
OSLL/github_repo_commitment_calc,5,���� �������� � google sheets,open,,2022-07-11 12:59:14,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,https://github.com/OSLL/lms_grades_export - ����� �������������� ������ ������ � ���� ����������� � ������ ���� (��� ��� �������������� � ��������),2023-06-19 10:12:55,Mark Zaslavskiy,zmm,,Empty field
18+
OSLL/github_repo_commitment_calc,4,������������ � �����-�����,open,,2022-07-11 12:55:01,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
19+
OSLL/github_repo_commitment_calc,3,��������� �������� ������ ����������� � ���� ����������� �� ����� -w,open,,2022-07-11 12:51:54,Mark Zaslavskiy,zmm,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
20+
OSLL/github_repo_commitment_calc,2,add_issue_pr_logging,closed,,2022-07-06 11:51:44,Mark Zaslavskiy,XandrNiko,Empty field,Empty field,Empty field,,2022-07-15 13:26:33,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field
21+
OSLL/github_repo_commitment_calc,1,add_github_commit_logger,closed,,2022-06-14 22:24:12,Mark Zaslavskiy,EFFECT322,Empty field,Empty field,Empty field,,2022-07-15 13:27:03,Empty field,Empty field,Empty field,Empty field,Empty field,Empty field

0 commit comments

Comments
 (0)