Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 2.17 KB

README.md

File metadata and controls

54 lines (37 loc) · 2.17 KB

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/.