You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why take the effort of copy/pasting manually when you can make use of technology to do it for ya.
3
+
Why take the effort of copy/pasting your solution manually when you can make use of technology to do it for ya while you can grind more in Leetcode.
4
4
5
5
LC-SyncInAction solves this problem and takes your cookie in his hand to pull and push your Accepted solution everyday.
6
6
7
-
First run will pull all your Accepted solutions from LC ( which will take **1h 46 min to 2h 30 min approx** ) and create those submission in the current repository in the specified directory (root, if not provided )
7
+
First run will pull all your Accepted solutions from LC ( which will take **1h 45 min to 2h 30 min approx** ) and create a file of those submission in the current repository in the specified directory (root, if not provided )
8
8
9
-
All the run afterwards will fetch your last 20 Accepted submission everyday at 8AM UTC ( 1:30 IST ) daily.
9
+
Every file created using this tool follows this naming convention : <submission_id>_<title_slug_of_problem>
10
+
11
+
All the run afterwards will won't take long as the first run ( will be completed in few seconds :) ) and will fetch last 20 submissions and this step can be customized according to your preferred timing with the help of [schedule](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events)
10
12
11
13
### Requirements :
12
14
13
15
`cookie` value from the request headers https://leetcode.com/<your-username>
14
16
15
-
This cookie value has to be saved as a repository secret named as `cookieVal` which **has to be** passed as `${{ secrets.cookieVal }}` into action step [you can look here on how to do save a repository secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)
17
+
This cookie value has to be saved in repository secret named as `cookieVal` which **has to be** passed as `${{ secrets.cookieVal }}` into action step [you can look here on how to do save a repository secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)
16
18
17
19
You can also pass location of directory, to option `solution_location` , where would you like to collect all your solutions ( the default is root directory ).
18
20
19
21
## Usage
20
22
21
-
Example use case of this action in your WORKFLOWS.
23
+
Make a WORKFLOW file under `.github` folder by any name of your choice and start writing github actions.
22
24
25
+
Example use case of action in your WORKFLOWS.
26
+
27
+
on:
28
+
schedule:
29
+
- cron : '0 8 * * *' # your favourable timing
30
+
23
31
jobs :
24
32
build :
25
33
run-on : ubuntu-latest
@@ -30,10 +38,18 @@ Example use case of this action in your WORKFLOWS.
solution_location : 'path/to/directory' # if any , default is root '.'
41
+
42
+
# dependency, to write newly created files to the root directory of the repository.
43
+
44
+
- name: pushing the changes!!
45
+
uses: stefanzweifel/git-auto-commit-action@v4
46
+
with:
47
+
commit_message: Adding new LC solutions # or anything you want to add.
33
48
49
+
If you need to look at examples check [.github/WORKFLOWS](https://github.com/ME-ON1/Leetcode-SyncInAction/tree/main/.github/WORKFLOWS) to understand a bit more.
34
50
35
51
## License
36
52
37
-
The scripts and documentation in this project are released under the [MIT License]()
53
+
The scripts and documentation in this project are released under the [MIT License](https://github.com/ME-ON1/Leetcode-SyncInAction/blob/main/LICENSE)
0 commit comments