blombard / move-to-next-iteration

Automatically move issues to next iteration
MIT License
30 stars 13 forks source link

Support for Emoji Icons in Status names #2

Open thekaushikls opened 1 year ago

thekaushikls commented 1 year ago

Hi, thank you for your GitHubAction, it has been super helpful. I have been playing around with it for sometime now.

I noticed that in one of my projects, I have the Status name contain emoji, and that seems to not be supported.

In the below image, I am updating some of the statuses. But, only the first one (🧱 Planning) seems to be updated. Depending on the order, only the first status gets updated.

Is there a specific way to include names with emoji?

MoveIssuesToNextIteration-Issue

Can I do something like this?

statuses:
- 🧱 Planning
- πŸ“‹ Backlog
blombard commented 1 year ago

Hello @thekaushikls πŸ‘‹

The problem here is how I parse the statuses.

const statuses = core.getInput('statuses').split(',');

So in your case the action is looking for statuses who start with an empty space (except the first one)

The quick fix for you is just to remove the space after the comma.

statuses: 🧱 Planning,πŸ“‹ Backlog...

But you are right that

statuses:
  - 🧱 Planning
  - πŸ“‹ Backlog

seems neater.

So if I find time, I'll update the code to support this structure.

Edit: I updated the README: https://github.com/blombard/move-to-next-iteration/commit/1eedfb048afab55d6c7f25a9884ce97d56e738f9

thekaushikls commented 1 year ago

Hi, thanks for suggesting to remove the white-spaces. I removed the emojis as a temp fix, will try your method.

Also, I dont think it is common practice to name something that starts with a whitespace. I think just trim() should do the trick.

agarzola commented 7 months ago

While working on a PR for #5, I experimented with the idea of making statuses an array and discovered that action inputs cannot be arrays. In other words, as far as I can tell this doesn’t work:

statuses:
  - Planning
  - Backlog