From a8e674b33db4bbd4dd712e13296b37e1e16aaf31 Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Wed, 13 Mar 2024 19:52:25 +0530 Subject: [PATCH 1/2] Related #1627 share issue to twitter/x copy issue to clipboard now user can't like and dislike an issue at the same time. it updates realtime --- website/templates/base.html | 4 +- website/templates/includes/_dislikes3.html | 20 +---- .../includes/_like_dislike_share.html | 74 ++++++++++++++++++- website/templates/includes/_likes3.html | 23 +----- website/templates/issue3.html | 13 ++-- 5 files changed, 86 insertions(+), 48 deletions(-) diff --git a/website/templates/base.html b/website/templates/base.html index 356dcc0777..ac674b7b30 100644 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -65,8 +65,8 @@ type="text/css"> diff --git a/website/templates/includes/_like_dislike_share.html b/website/templates/includes/_like_dislike_share.html index 4698f28cbd..e9c0cf74cb 100644 --- a/website/templates/includes/_like_dislike_share.html +++ b/website/templates/includes/_like_dislike_share.html @@ -1,4 +1,5 @@ {% load gravatar %} +{% load custom_tags %} + diff --git a/website/templates/includes/_likes3.html b/website/templates/includes/_likes3.html index b7510ad942..ccbb9a6160 100644 --- a/website/templates/includes/_likes3.html +++ b/website/templates/includes/_likes3.html @@ -2,8 +2,9 @@
{% endif %} - diff --git a/website/templates/issue3.html b/website/templates/issue3.html index a29ba2c63e..2e1ed6f49e 100644 --- a/website/templates/issue3.html +++ b/website/templates/issue3.html @@ -17,16 +17,17 @@ content="{% block og_title %}{{ object.description }}{% endblock og_title %}" /> {% for screenshot in screenshots %} + content="https://{% env 'FQDN' %}{% block og_image %}{{ screenshot.image.url }}{% endblock og_image %}" /> {% endfor %} {% comment %} TODO: change to update DOMAIN {% endcomment %} - + + content="https://{% env 'FQDN' %}/issue3/{{ object.id }}" /> {% endblock metaTags %} @@ -74,8 +75,10 @@

{{ object.description | truncatecha


-

Issue Description

-

{{ object.markdown_description|escapejs }}

+ {% if object.markdown_description %} +

Issue Description

+

+ {% endif %} From f3b7b6598e19f93144b7b2ab5c9c248ba78338c6 Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Sat, 16 Mar 2024 22:19:41 +0530 Subject: [PATCH 2/2] RUN - pre-commit run --all-files --- scripts/get_daily_commits_for_user.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/get_daily_commits_for_user.py b/scripts/get_daily_commits_for_user.py index 0f546c0dc7..2751fd5715 100644 --- a/scripts/get_daily_commits_for_user.py +++ b/scripts/get_daily_commits_for_user.py @@ -1,7 +1,8 @@ -import requests import csv from datetime import datetime, timedelta +import requests + # Configuration username = "USERNAME" # GitHub username of the user repo = "REPOSITORY" # Repository name @@ -47,9 +48,7 @@ def fetch_commit_counts(username, repo, owner, headers, start_date, end_date): # Fetch commit counts -commit_counts = fetch_commit_counts( - username, repo, owner, headers, start_date, end_date -) +commit_counts = fetch_commit_counts(username, repo, owner, headers, start_date, end_date) # Write commit counts to CSV with open(csv_filename, "w", newline="") as csvfile: