Skip to content

Automatically update LeetCode CSRF token and session cookie values in GitHub repository secrets every 2 weeks.

License

Notifications You must be signed in to change notification settings

vishrutkmr7/UpdateLCCookies

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Cookies Updater

LeetCode Cookies Updater is a GitHub Action that automatically updates LeetCode CSRF token and session cookie values in your GitHub repository secrets every 2 weeks. This is useful for keeping your LeetCode syncing workflows running without manual intervention.

Usage

Add the following workflow to your repository in the .github/workflows directory:

name: Update Leetcode Cookies

on:
  schedule:
    - cron: "0 0 */14 * *" # Run every 2 weeks

jobs:
  update_cookies:
    runs-on: ubuntu-latest

    steps:
      - name: Update Leetcode cookies
        uses: vishrutkmr7/[email protected]
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          leetcode-email: ${{ secrets.LEETCODE_EMAIL }}
          leetcode-password: ${{ secrets.LEETCODE_PASSWORD }}

Required Secrets

You need to set the following secrets in your GitHub repository:

To add the secrets:

  1. Go to the main page of your repository on GitHub.
  2. Click on the "Settings" tab.
  3. In the left sidebar, click on "Secrets".
  4. Click on the "New repository secret" button and add the GITHUB_TOKEN, LEETCODE_EMAIL, and LEETCODE_PASSWORD secrets one by one with the corresponding values.

Contributing

We welcome contributions to the LeetCode Cookies Updater! If you'd like to contribute, please fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License. The full text of the license can be found at https://choosealicense.com/licenses/mit/.

About

Automatically update LeetCode CSRF token and session cookie values in GitHub repository secrets every 2 weeks.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published