Skip to content

Commit 5e64e35

Browse files
Merge pull request #18 from paxtonfitzpatrick/actions-urls
update auto-generated URLs to open problems in "daily question" view
2 parents ac70ccd + 9fb5eb4 commit 5e64e35

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.github/workflows/create_new_note.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ jobs:
2525
2626
TITLE=$(jq -r '.data.activeDailyCodingChallengeQuestion.question.title' response.json)
2727
TITLE_SLUG=$(jq -r '.data.activeDailyCodingChallengeQuestion.question.titleSlug' response.json)
28-
LINK="https://leetcode.com/problems/${TITLE_SLUG}"
28+
LINK="https://leetcode.com/problems/${TITLE_SLUG}/description/?envType=daily-question"
2929
GITHUB_USERNAME="${{ github.actor }}"
3030
3131
# Create problem directory and note
3232
PROBLEM_DIR="problems/${PROBLEM_ID}"
3333
NOTE_FILE="${PROBLEM_DIR}/${GITHUB_USERNAME}.md"
3434
mkdir -p "${PROBLEM_DIR}"
35-
35+
3636
# Customize template and write to new file
3737
sed "s|<NUMBER>|${PROBLEM_ID}|g; s|<TITLE>|${TITLE}|g; s|<LINK TO DESCRIPTION>|${LINK}|g" problems/template.md > "${NOTE_FILE}"
3838

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Each day (ideally) we'll attempt the daily [leetcode](https://leetcode.com) prob
99

1010
| 📆 Date | ⚙️ Problem | 📝 Link to notes | 🚦 Difficulty |
1111
|--------------|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|------------|
12-
| July 1, 2024 | [1550](https://leetcode.com/problems/three-consecutive-odds/description/) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/1550) | 🟢 Easy |
13-
| July 2, 2024 | [350](https://leetcode.com/problems/intersection-of-two-arrays-ii/) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/350) | 🟢 Easy |
14-
| July 3, 2024 | [1509](https://leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves/) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/1509) | 🟡 Medium |
15-
| July 4, 2024 | [2181](https://leetcode.com/problems/merge-nodes-in-between-zeros/) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/2181) | 🟡 Medium |
16-
| July 5, 2024 | [2058](https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/2058) | 🟡 Medium |
17-
| July 6, 2024 | [2582](https://leetcode.com/problems/pass-the-pillow) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/2582) | 🟢 Easy |
18-
| July 7, 2024 | [1518](https://leetcode.com/problems/water-bottles) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/1518) | 🟢 Easy |
12+
| July 1, 2024 | [1550](https://leetcode.com/problems/three-consecutive-odds/description/description/?envType=daily-question) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/1550) | 🟢 Easy |
13+
| July 2, 2024 | [350](https://leetcode.com/problems/intersection-of-two-arrays-ii/description/?envType=daily-question) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/350) | 🟢 Easy |
14+
| July 3, 2024 | [1509](https://leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves/description/?envType=daily-question) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/1509) | 🟡 Medium |
15+
| July 4, 2024 | [2181](https://leetcode.com/problems/merge-nodes-in-between-zeros/description/?envType=daily-question) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/2181) | 🟡 Medium |
16+
| July 5, 2024 | [2058](https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/description/?envType=daily-question) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/2058) | 🟡 Medium |
17+
| July 6, 2024 | [2582](https://leetcode.com/problems/pass-the-pillow/description/?envType=daily-question) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/2582) | 🟢 Easy |
18+
| July 7, 2024 | [1518](https://leetcode.com/problems/water-bottles/description/?envType=daily-question) | [Click here](https://github.com/ContextLab/leetcode-solutions/tree/main/problems/1518) | 🟢 Easy |
1919

2020
# Join our discussion!
2121

update_readme.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
problem_id = problem['questionFrontendId']
3737
title = problem['title']
3838
title_slug = problem['titleSlug']
39-
link = f"https://leetcode.com/problems/{title_slug}"
39+
link = f"https://leetcode.com/problems/{title_slug}/description/?envType=daily-question"
4040
difficulty = problem['difficulty']
4141
difficulty_icon = "🟢" if difficulty == "Easy" else "🟡" if difficulty == "Medium" else "🔴"
4242
note_link = f"{repo_url}/tree/main/problems/{problem_id}"

0 commit comments

Comments
 (0)