Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Feature]: Problems randomEmoji in Templates #152

Closed
eryajf opened this issue Jun 27, 2022 · 5 comments
Closed

[Feature]: Problems randomEmoji in Templates #152

eryajf opened this issue Jun 27, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@eryajf
Copy link

eryajf commented Jun 27, 2022

Describe the bug
When I used randomEmoji in multiple feed templates, they got the same results.

Expected behavior
I hope that different feeds will get different results.

Screenshots

image

Workflow Yml Used

name: Latest blog post workflow
on:
  schedule: # Run workflow automatically
    - cron: '0 * * * *' # Runs every hour, on the hour
  workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly
  push:
    branches:
      - main

jobs:
  update-readme-with-blog:
    name: Update this repo's README with latest blog posts
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Pull in dev.to posts
        uses: gautamkrishnar/blog-post-workflow@v1
        with:
          max_post_count: 3
          committer_username: "eryajf"
          committer_email: "eryajf@163.com"
          feed_list: "https://wiki.eryajf.net/rss.xml"
          template: "$newline- $randomEmoji(💯,🔥,💫,🚀,🌮,📝,🥳,💻,🧰,🏊,🥰,🧐,🤓,😎,🥸,🤩,🤗,🤔,🫣,🤭,🤠,👹,👺,🤡,🤖,🎃,😺,🫶,👍,💪,💄,👀,🧠,🧑‍🏫,👨‍🏫,💂,🧑‍💻,🥷,💃,🕴,💼,🎓,🐻,🐵,🙉,🦄,🦆,🦅,🦍,🦣,🐘,🦒,🦏,🐎,🦩,🐲,🌝,🌜,🌏,🌈,🌊,🎬,🎭,🚀,🚦,⛽️,🗽,🎡,🌋,🌁,💡,🕯,🪜,🧰,⚗️,🔭,🪄,🎊,🎉,) [$title]($url) $newline"
      - name: Pull in dev.to posts
        uses: gautamkrishnar/blog-post-workflow@v1
        with:
          max_post_count: 3
          committer_username: "eryajf"
          committer_email: "eryajf@163.com"
          comment_tag_name: "DecoHack"
          feed_list: "https://www.decohack.com/feed"
          template: "$newline- $randomEmoji(💯,🔥,💫,🚀,🌮,📝,🥳,💻,🧰,🏊,🥰,🧐,🤓,😎,🥸,🤩,🤗,🤔,🫣,🤭,🤠,👹,👺,🤡,🤖,🎃,😺,🫶,👍,💪,💄,👀,🧠,🧑‍🏫,👨‍🏫,💂,🧑‍💻,🥷,💃,🕴,💼,🎓,🐻,🐵,🙉,🦄,🦆,🦅,🦍,🦣,🐘,🦒,🦏,🐎,🦩,🐲,🌝,🌜,🌏,🌈,🌊,🎬,🎭,🚀,🚦,⛽️,🗽,🎡,🌋,🌁,💡,🕯,🪜,🧰,⚗️,🔭,🪄,🎊,🎉,) [$title]($url) $newline"
@eryajf eryajf added the bug Something isn't working label Jun 27, 2022
@gautamkrishnar gautamkrishnar added enhancement New feature or request and removed bug Something isn't working labels Jun 27, 2022
@gautamkrishnar gautamkrishnar changed the title [Bug]: Problems randomEmoji in Templates [Feature]: Problems randomEmoji in Templates Jun 27, 2022
@gautamkrishnar
Copy link
Owner

gautamkrishnar commented Jun 27, 2022

@eryajf just released a new version with this feature, please use the following yaml code:

on:
  schedule: # Run workflow automatically
    - cron: '0 * * * *' # Runs every hour, on the hour
  workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly
  push:
    branches:
      - main

jobs:
  update-readme-with-blog:
    name: Update this repo's README with latest blog posts
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Pull in dev.to posts
        uses: gautamkrishnar/blog-post-workflow@v1
        with:
          max_post_count: 3
          committer_username: "eryajf"
          committer_email: "eryajf@163.com"
          feed_list: "https://wiki.eryajf.net/rss.xml"
          rand_seed: "seed1"
          template: "$newline- $randomEmoji(💯,🔥,💫,🚀,🌮,📝,🥳,💻,🧰,🏊,🥰,🧐,🤓,😎,🥸,🤩,🤗,🤔,🫣,🤭,🤠,👹,👺,🤡,🤖,🎃,😺,🫶,👍,💪,💄,👀,🧠,🧑‍🏫,👨‍🏫,💂,🧑‍💻,🥷,💃,🕴,💼,🎓,🐻,🐵,🙉,🦄,🦆,🦅,🦍,🦣,🐘,🦒,🦏,🐎,🦩,🐲,🌝,🌜,🌏,🌈,🌊,🎬,🎭,🚀,🚦,⛽️,🗽,🎡,🌋,🌁,💡,🕯,🪜,🧰,⚗️,🔭,🪄,🎊,🎉) [$title]($url) $newline"
      - name: Pull in dev.to posts
        uses: gautamkrishnar/blog-post-workflow@v1
        with:
          max_post_count: 3
          committer_username: "eryajf"
          committer_email: "eryajf@163.com"
          comment_tag_name: "DecoHack"
          feed_list: "https://www.decohack.com/feed"
          rand_seed: "seed2"
          template: "$newline- $randomEmoji(💯,🔥,💫,🚀,🌮,📝,🥳,💻,🧰,🏊,🥰,🧐,🤓,😎,🥸,🤩,🤗,🤔,🫣,🤭,🤠,👹,👺,🤡,🤖,🎃,😺,🫶,👍,💪,💄,👀,🧠,🧑‍🏫,👨‍🏫,💂,🧑‍💻,🥷,💃,🕴,💼,🎓,🐻,🐵,🙉,🦄,🦆,🦅,🦍,🦣,🐘,🦒,🦏,🐎,🦩,🐲,🌝,🌜,🌏,🌈,🌊,🎬,🎭,🚀,🚦,⛽️,🗽,🎡,🌋,🌁,💡,🕯,🪜,🧰,⚗️,🔭,🪄,🎊,🎉) [$title]($url) $newline"

@eryajf
Copy link
Author

eryajf commented Jun 27, 2022

Thank you, this is possible. I would like to know what the current default value "username/repository" refers to and whether it is possible to change this default value to a timestamp, so that this parameter does not need to be configured by default.

@gautamkrishnar
Copy link
Owner

@eryajf setting it as a timestamp value is a bad idea. It will update your repository every 5 minutes. That's why it is better to keep it as a static value. Using different static values gives different results. By default, if you don't give rand_seed argument, it will default to username/repository -> in your case eryajf/eryajf. This will make workflow generate unique random emojis for every user which is using it.

@eryajf
Copy link
Author

eryajf commented Jun 27, 2022

see: https://github.com/eryajf/read-list

In fact, I want to use this project to make a repository for reading lists, so at this time I need to set different values for different blogs, so at this time, if the default value is the timestamp of the project runtime, I don't have to care about this configuration item anymore. Similarly, even in personal warehouses, the use of timestamps is a matter of no effect.

@eryajf
Copy link
Author

eryajf commented Jun 27, 2022

Of course, what I write manually now can meet my needs. I just hope this place can be more elegant.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants