Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add description of habitica update_tasks action #35211

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

catsmanac
Copy link
Contributor

@catsmanac catsmanac commented Oct 13, 2024

Proposed change

Add description for action update_tasks being added to Habitica integration

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

  • New Features

    • Introduced new actions for updating Habitica tasks: daily, habit, reward, and to-do.
    • Enhanced API service documentation with new parameters and examples for task creation.
  • Documentation

    • Expanded guidance on using the Habitica API, including detailed instructions for updating tasks and interacting with the API effectively.

@home-assistant home-assistant bot added Hacktoberfest An PR on this issue (or the PR itself) is eligible towards Hacktoberfest! has-parent This PR has a parent PR in a other repo next This PR goes into the next branch labels Oct 13, 2024
Copy link

netlify bot commented Oct 13, 2024

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit c3afd0a
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/67378b37b8f211000843602b
😎 Deploy Preview https://deploy-preview-35211--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

coderabbitai bot commented Oct 13, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in the pull request enhance the Habitica integration documentation for Home Assistant by introducing a new section on "Task update actions." Four actions have been added for updating tasks: habitica.update_daily, habitica.update_todo, habitica.update_habit, and habitica.update_reward, each with specific attributes for task modification. Additionally, the documentation for the habitica.api_call action has been expanded to include new parameters and usage examples for creating tasks via the API.

Changes

File Change Summary
source/_integrations/habitica.markdown Added new actions for updating tasks: habitica.update_daily, habitica.update_todo, habitica.update_habit, habitica.update_reward. Updated habitica.api_call with new parameters and usage examples.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HomeAssistant
    participant HabiticaAPI

    User->>HomeAssistant: Request to update task
    HomeAssistant->>HabiticaAPI: Call habitica.update_daily
    HabiticaAPI-->>HomeAssistant: Confirm task update
    HomeAssistant-->>User: Task updated successfully
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 8a9f78b and 3a306b6.

📒 Files selected for processing (1)
  • source/_integrations/habitica.markdown (1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/habitica.markdown

[uncategorized] ~91-~91: A comma might be missing here.
Context: ...sks attributes by task id. Four service exist one for each task type: - `habita.upda...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

source/_integrations/habitica.markdown Outdated Show resolved Hide resolved
Comment on lines 89 to 91
### Action update habita tasks

Update Habita tasks attributes by task id. Four service exist one for each task type:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct spelling and improve formatting in the new section title.

There are a few minor issues in the new section title:

  1. The spelling of "Habitica" is incorrect (currently "habita").
  2. The formatting could be improved for consistency with other sections.

Please apply the following changes:

-### Action update habita tasks
+### Action `habitica.update_tasks`
 
-Update Habita tasks attributes by task id. Four service exist one for each task type:
+Update Habitica task attributes by task ID. Four services exist, one for each task type:

This change corrects the spelling and improves the formatting to match the style of other action descriptions in the document.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Action update habita tasks
Update Habita tasks attributes by task id. Four service exist one for each task type:
### Action `habitica.update_tasks`
Update Habitica task attributes by task ID. Four services exist, one for each task type:
🧰 Tools
🪛 LanguageTool

[uncategorized] ~91-~91: A comma might be missing here.
Context: ...sks attributes by task id. Four service exist one for each task type: - `habita.upda...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

source/_integrations/habitica.markdown Outdated Show resolved Hide resolved
@catsmanac catsmanac marked this pull request as draft October 14, 2024 11:25
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (4)
source/_integrations/habitica.markdown (4)

89-91: Correct spelling and improve formatting in the new section title and introduction.

There are a few minor issues in the new section title and introduction:

  1. The spelling of "Habitica" is incorrect in the action names (currently "habita").
  2. The formatting of the action names could be improved for consistency with other sections.
  3. The introduction paragraph could be more concise and clear.

Please apply the following changes:

-### Task update actions
+### Task Update Actions
 
-The Habitica integration offers four actions to update the details and configuration of dailies, to-do's, habits and rewards.
+The Habitica integration offers four actions to update the details and configuration of tasks:
+
+- `habitica.update_daily`
+- `habitica.update_todo`
+- `habitica.update_habit`
+- `habitica.update_reward`

These changes correct the spelling, improve the formatting, and provide a clearer introduction to the new actions.


97-107: Improve clarity and consistency in the common attributes table.

To enhance the readability and accuracy of the common attributes table, consider the following suggestions:

  1. Make the "config_entry" description more specific.
  2. Generalize the "task" description for all task types.
  3. Clarify the purpose of the "priority" attribute.
  4. Ensure consistent capitalization and punctuation across all descriptions.

Please apply these changes:

 | Data attribute         | Optional | Description                                                                                                                                             |
 | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| config_entry           | no       | Select the Habitica account to update a task.                                                                                                           |
-| task                   | no       | The name (or task ID) of the daily you want to update.                                                                                                  |
+| config_entry           | no       | The configuration entry name for the Habitica account you want to use for updating the task.                                                            |
+| task                   | no       | The name or task ID of the task you want to update.                                                                                                     |
 | rename                 | yes      | The new title for the Habitica task.                                                                                                                    |
 | description            | yes      | The new description for the Habitica task.                                                                                                              |
-| priority               | yes      | Update the difficulty of a task. (not available for rewards)                                                                                            |
+| priority               | yes      | Update the difficulty/importance of a task (affects task value and rewards). Not available for rewards.                                                 |
 | tag                    | yes      | Add tags to the Habitica task. If a tag does not already exist, a new one will be created.                                                              |
 | remove_tag             | yes      | Remove tags from the Habitica task.                                                                                                                     |
-| alias                  | yes      | A task alias can be used instead of the name or task ID. Only dashes, underscores, and alphanumeric characters are supported. The task alias must be unique among all your tasks. |
+| alias                  | yes      | A unique identifier for the task that can be used instead of the name or task ID. Only dashes, underscores, and alphanumeric characters are supported. |

These changes improve the clarity and consistency of the attribute descriptions.


108-154: Improve consistency and clarity in task-specific attribute tables.

To enhance the readability and accuracy of the task-specific attribute tables, please consider the following suggestions:

  1. Correct the "habita" typo in all action names to "habitica".
  2. Improve consistency in attribute descriptions across all tables.
  3. Ensure uniform formatting for all tables.

Please apply these changes:

-#### Action `habita.update_daily`
+#### Action `habitica.update_daily`

 | Data attribute         | Optional | Description                                                                                                                                             |
 | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
 | add_checklist_item     | yes      | Add new checklist items to a task's checklist.                                                                                                          |
 | remove_checklist_item  | yes      | Remove checklist items from a task's checklist.                                                                                                         |
 | score_checklist_item   | yes      | Mark checklist items from a task's checklist as completed.                                                                                              |
 | unscore_checklist_item | yes      | Undo completion of checklist items from a task's checklist.                                                                                             |
-| start_date             | yes      | Update the start date of a daily to define when it becomes active. Also determines the specific weekday or day of the month on which the habit repeats. |
+| start_date             | yes      | Update the start date of a daily to define when it becomes active. Also determines the specific weekday or day of the month on which the daily repeats. |
 | frequency              | yes      | Update the repetition interval of a daily.                                                                                                              |
-| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats. A value of 0 means the daily will never be due (a 'Grey-Daily').           |
+| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats. A value of 0 means the daily will never be due (a 'Grey Daily').        |
 | repeat                 | yes      | Update the days of the week the daily repeats.                                                                                                          |
 | repeat_monthly         | yes      | Update if a monthly recurring task repeats on the same day or the same week and weekday of the month, determined by the start date.                     |
-| reminder_time          | yes      | Add reminders to a Habitica task.                                                                                                                       |
-| remove_reminder_time   | yes      | Remove specific reminders from a Habitica task.                                                                                                         |
-| clear_reminder         | yes      | Remove all reminders from a Habitica task.                                                                                                              |
+| reminder_time          | yes      | Add reminders to the daily task.                                                                                                                        |
+| remove_reminder_time   | yes      | Remove specific reminders from the daily task.                                                                                                          |
+| clear_reminder         | yes      | Remove all reminders from the daily task.                                                                                                               |
 | streak                 | yes      | Adjust or reset the streak counter of the daily.                                                                                                        |

-#### Action `habita.update_todo`
+#### Action `habitica.update_todo`

 | Data attribute         | Optional  | Description                                                                                                       |
 | ---------------------- | --------- | ----------------------------------------------------------------------------------------------------------------- |
 | add_checklist_item     | yes       | Add new checklist items to a task's checklist.                                                                    |
 | remove_checklist_item  | yes       | Remove checklist items from a task's checklist.                                                                   |
 | score_checklist_item   | yes       | Mark checklist items from a task's checklist as completed.                                                        |
 | unscore_checklist_item | yes       | Undo completion of checklist items from a task's checklist.                                                       |
-| priority               | yes       | Update the difficulty of a task.                                                                                  |
+| priority               | yes       | Update the difficulty/importance of the todo task.                                                                |
 | date                   | yes       | Update or set the to-do's due date.                                                                               |
 | clear_date             | yes       | Remove the due date from the to-do.                                                                               |
-| reminder               | yes       | Add reminders to a Habitica task.                                                                                 |
-| remove_reminder        | yes       | Remove specific reminders from a Habitica task.                                                                   |
-| clear_reminder         | yes       | Remove all reminders from a Habitica task.                                                                        |
+| reminder               | yes       | Add reminders to the todo task.                                                                                   |
+| remove_reminder        | yes       | Remove specific reminders from the todo task.                                                                     |
+| clear_reminder         | yes       | Remove all reminders from the todo task.                                                                          |

-#### Action `habita.update_habit`
+#### Action `habitica.update_habit`

 | Data attribute         | Optional  | Description                                                                                                       |
 | ---------------------- | --------- | ----------------------------------------------------------------------------------------------------------------- |
 | up_down                | yes       | Update if the habit is good and rewarding (positive), bad and penalizing (negative), or both.                     |
 | frequency              | yes       | Update the reset frequency of a habit's counter: daily at the start of a new day, weekly after Sunday night, and monthly at the end of the month. |
 | counter_up             | yes       | Update the up counter of a positive habit.                                                                        |
 | counter_down           | yes       | Update the down counter of a negative habit.                                                                      |

-#### Action `habita.update_reward`
+#### Action `habitica.update_reward`

 | Data attribute | Optional  | Description                  |
 | -------------- | --------- | -----------------------------|
 | cost           | yes       | Update the cost of a reward. |

These changes improve the consistency and clarity of the task-specific attribute tables.


Line range hint 156-265: Enhance formatting and clarity in the API Service section.

The API Service section provides comprehensive information and a helpful example. To further improve its readability and consistency, consider the following suggestions:

  1. Use consistent formatting for table headers.
  2. Add a brief introduction before the API Service Parameters table.
  3. Improve the formatting of the JSON examples.

Please apply these changes:

 ## API Service

 At runtime, you will be able to use the API for each respective user by their Habitica's username.
 You can override this by passing `name` key, this value will be used instead of the username.
 If you are hosting your own instance of Habitica, you can specify a URL to it in `url` key.

 ### API Service Parameters

+The `habitica.api_call` action accepts the following parameters:
+
 | Data attribute | Required | Type     | Description                                                                                                       |
-| ---------------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
+| ---------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
 | `name`                 | yes      | string   | Habitica's username as per `configuration.yaml` entry.                                                            |
 | `path`                 | yes      | [string] | Items from API URL in form of an array with method attached at the end. See the example below.                    |
 | `args`                 | no       | map      | Any additional JSON or URL parameter arguments. See the example below and [apidoc](https://habitica.com/apidoc/). |

 A successful run of this action will fire an event `habitica_api_call_success`.

 | Event data attribute | Type     | Description                                                                                                                                                           |
 | -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
 | `name`               | string   | Copied from the data attribute.                                                                                                                                   |
 | `path`               | [string] | Copied from the data attribute.                                                                                                                                   |
 | `data`               | map      | Deserialized `data` field of JSON object Habitica's server returned in response to API call. For more info see the [API documentation](https://habitica.com/apidoc/). |

 #### Let's consider some examples on how to use the action

 For example, let's say that there is a configured `habitica` platform for user `xxxNotAValidNickxxx` with their respective `api_user` and `api_key`.
 Let's create a new task (a todo) for this user via Home Assistant. There is an [API call](https://habitica.com/apidoc/#api-Task-CreateUserTasks) for this purpose.
 To create a new task one should hit `https://habitica.com/api/v3/tasks/user` endpoint with `POST` request with a JSON object with task properties.
 So let's call the API on `habitica.api_call`.

 - The `name` key becomes `xxxNotAValidNickxxx`.
 - The `path` key is trickier.
   - Remove `https://habitica.com/api/v3/` at the beginning of the endpoint URL.
   - Split the remaining on slashes (/) and **append the lowercase method** at the end.
   - You should get `["tasks", "user", "post"]`. To get a better idea of the API you are recommended to try all of the API calls in IPython console [using this package](https://github.com/ASMfreaK/habitipy/blob/master/README.md).
 - The `args` key is more or less described in the [API documentation](https://habitica.com/apidoc/).

 Combining all together:
 call `habitica.api_call` with data

-```json
+```yaml
 {
   "name": "xxxNotAValidNickxxx",
   "path": ["tasks", "user", "post"],
   "args": {"text": "Use API from Home Assistant", "type": "todo"}
 }

This call will create a new todo on xxxNotAValidNickxxx's account with text Use API from Home Assistant like this:

example task created

Also an event habitica_api_call_success will be fired with the following data:

-json +yaml
{
"name": "xxxNotAValidNickxxx",
"path": ["tasks", "user", "post"],
"data": {
"challenge": {},
"group": {"approval": {"required": false,
"approved": false,
"requested": false},
"assignedUsers": [],
"sharedCompletion": "recurringCompletion"},
"completed": false,
"collapseChecklist": false,
"type": "todo",
"notes": "",
"tags": [],
"value": 0,
"priority": 1,
"attribute": "str",
"text": "Use API from Home Assistant",
"checklist": [],
"reminders": [],
"_id": "NEW_TASK_UUID",
"createdAt": "2018-08-09T18:03:27.759Z",
"updatedAt": "2018-08-09T18:03:27.759Z",
"userId": "xxxNotAValidNickxxx's ID",
"id": "NEW_TASK_UUID"}
}

These changes improve the formatting and clarity of the API Service section.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3a306b6 and 9224eeb.

📒 Files selected for processing (1)
  • source/_integrations/habitica.markdown (1 hunks)
🧰 Additional context used
🔇 Additional comments (1)
source/_integrations/habitica.markdown (1)

Line range hint 1-265: Approve changes with minor suggestions for improvement.

The updates to the Habitica integration documentation are comprehensive and provide valuable information for users. The new sections on task update actions and the expanded API service documentation significantly enhance the usefulness of this integration.

Overall, the changes are approved with the following summary of improvements:

  1. Corrected spelling of "Habitica" in action names.
  2. Improved consistency in attribute descriptions across all tables.
  3. Enhanced clarity in the common attributes table and task-specific attribute tables.
  4. Suggested minor formatting improvements in the API Service section.

These minor adjustments will further improve the readability and accuracy of the documentation. Once these changes are implemented, the documentation will provide an excellent resource for users of the Habitica integration in Home Assistant.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (3)
source/_integrations/habitica.markdown (3)

152-169: Enhance attribute descriptions for clarity.

Consider adding the following details to make the documentation more helpful:

  1. For frequency: List the valid values (e.g., "daily", "weekly", "monthly").
  2. For every_x: Specify the valid range of values and provide examples.
-| frequency              | yes      | Update the repetition interval of a daily.                                                                                              |
+| frequency              | yes      | Update the repetition interval of a daily. Valid values: "daily", "weekly", "monthly", "yearly".                                        |
-| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats. A value of 0 means the daily will never be due (a 'Grey-Daily').           |
+| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats (e.g., 1 = every day/week/month/year, 2 = every other day/week/month/year). A value of 0 means the daily will never be due (a 'Grey-Daily'). |

185-193: Maintain consistent attribute descriptions.

The frequency attribute description is more detailed in the habit section compared to the daily tasks section. Consider using the same level of detail in both sections for consistency.


280-280: Remove extra blank line.

Remove one of the consecutive blank lines to maintain consistent markdown formatting.

🧰 Tools
🪛 Markdownlint

280-280: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 9224eeb and e228c7f.

📒 Files selected for processing (1)
  • source/_integrations/habitica.markdown (2 hunks)
🧰 Additional context used
🪛 Markdownlint
source/_integrations/habitica.markdown

280-280: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

🔇 Additional comments (3)
source/_integrations/habitica.markdown (3)

133-136: Spelling correction needed in action names.

The spelling issue identified in the previous review remains valid. The integration name should be "Habitica" not "habita" throughout the document.


137-151: LGTM! Common attributes are well-documented.

The common attributes section provides clear and comprehensive documentation for all task types.


194-199: LGTM! Reward tasks update action is well-documented.

The reward tasks update action and its attribute are clearly documented.

source/_integrations/habitica.markdown Outdated Show resolved Hide resolved
source/_integrations/habitica.markdown Outdated Show resolved Hide resolved
source/_integrations/habitica.markdown Outdated Show resolved Hide resolved
source/_integrations/habitica.markdown Outdated Show resolved Hide resolved
source/_integrations/habitica.markdown Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (4)
source/_integrations/habitica.markdown (4)

133-136: Enhance the introduction for clarity.

Consider expanding the introduction to better explain the purpose and scope of these actions:

 ### Task update actions
 
-The Habitica integration offers four actions to update the details and configuration of dailies, to-do's, habits and rewards.
+The Habitica integration provides four actions that allow you to modify existing tasks in your Habitica account. These actions enable you to update the details and configuration of your dailies, to-do's, habits, and rewards after they have been created.

160-163: Clarify frequency and every_x attributes.

The frequency and every_x attributes need clearer descriptions:

-| frequency              | yes      | Update the repetition interval of a daily.                                                                                              |
+| frequency              | yes      | Set how often the daily repeats: "daily", "weekly", "monthly", or "yearly".                                                             |
-| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats. A value of 0 means the daily will never be due (a 'Grey-Daily').           |
+| every_x                | yes      | Set how many frequency units should pass between repetitions (e.g., every 2 weeks).                                                      |

Add a note below the table:

Note: Setting `every_x` to 0 creates a 'Grey-Daily' that will never be due. This is useful for tasks that are currently inactive but you want to keep in your list.

190-190: Clarify habit frequency reset behavior.

The frequency description should be more explicit about counter reset timing:

-| frequency              | yes       | Update the reset frequency of a habit's counter: daily at the start of a new day, weekly after Sunday night, and monthly at the end of the month. |
+| frequency              | yes       | Set when the habit's counter resets: "daily" (at your custom day start time), "weekly" (after Sunday night), or "monthly" (at the end of the month). |

280-280: Remove extra blank line.

Remove one of the consecutive blank lines to maintain consistent formatting.

-

-
+
🧰 Tools
🪛 Markdownlint

280-280: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e228c7f and a5d1c28.

📒 Files selected for processing (1)
  • source/_integrations/habitica.markdown (2 hunks)
🧰 Additional context used
🪛 Markdownlint
source/_integrations/habitica.markdown

280-280: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

🔇 Additional comments (1)
source/_integrations/habitica.markdown (1)

194-199: LGTM!

The reward action documentation is clear and concise.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (6)
source/_integrations/habitica.markdown (6)

133-141: Enhance section introduction with links and clarity.

Consider improving the introduction by:

  1. Adding links to each action section
  2. Clarifying that these are service calls
 ### Task update actions
 
-The Habitica integration offers four actions to update the details and configuration of dailies, to-do's, habits and rewards.
+The Habitica integration offers four service calls to update the details and configuration of tasks:
+
+- [`habitica.update_daily`](#action-habiticaupdate_daily) for daily tasks
+- [`habitica.update_todo`](#action-habiticaupdate_todo) for to-do tasks
+- [`habitica.update_habit`](#action-habiticaupdate_habit) for habit tasks
+- [`habitica.update_reward`](#action-habiticaupdate_reward) for reward tasks

154-168: Enhance daily tasks attributes documentation.

Consider improving the table by:

  1. Adding examples for complex attributes
  2. Specifying the expected date format
  3. Clarifying the format for reminders
 | start_date             | yes      | Update the start date of a daily to define when it becomes active. Also determines the specific weekday or day of the month on which the habit repeats. |
+                        |          | Format: YYYY-MM-DD (e.g., "2024-11-20") |
 | frequency              | yes      | Update the repetition interval of a daily.                                                                                                              |
+                        |          | Allowed values: "daily", "weekly", "monthly", "yearly" |
 | reminder_time          | yes      | Add reminders to a Habitica task.                                                                                                                       |
+                        |          | Format: HH:MM (e.g., "09:00") |

172-182: Add examples and format specifications for todo attributes.

Similar to the daily tasks table, add format specifications and examples:

 | date                   | yes       | Update or set the to-do's due date.                                                                               |
+                        |           | Format: YYYY-MM-DD (e.g., "2024-11-20") |
 | reminder               | yes       | Add reminders to a Habitica task.                                                                                 |
+                        |           | Format: HH:MM (e.g., "09:00") |

186-191: Clarify habit attributes with allowed values and examples.

Add allowed values and examples to make the attributes clearer:

 | up_down                | yes       | Update if the habit is good and rewarding (positive), bad and penalizing (negative), or both.                     |
+                        |           | Allowed values: "up" (positive only), "down" (negative only), "both" |
 | frequency              | yes       | Update the reset frequency of a habit's counter: daily at the start of a new day, weekly after Sunday night, and monthly at the end of the month. |
+                        |           | Allowed values: "daily", "weekly", "monthly" |

195-197: Add format specification for reward cost.

Clarify the expected format for the cost attribute:

 | cost           | yes       | Update the cost of a reward. |
+              |           | Format: Positive number (e.g., "10" or "10.5") |

279-279: Remove extra blank line.

Remove one of the consecutive blank lines to comply with markdown formatting standards.

🧰 Tools
🪛 Markdownlint

279-279: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a5d1c28 and cbd75f5.

📒 Files selected for processing (1)
  • source/_integrations/habitica.markdown (2 hunks)
🧰 Additional context used
🪛 Markdownlint
source/_integrations/habitica.markdown

279-279: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

🔇 Additional comments (1)
source/_integrations/habitica.markdown (1)

142-150: Previous review comment is still applicable.

The suggestions from the previous review about improving attribute descriptions remain valid.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (6)
source/_integrations/habitica.markdown (6)

210-213: Enhance the introduction for clarity.

Consider clarifying that these actions are for modifying existing tasks:

-The Habitica integration offers four actions to update the details and configuration of dailies, to-do's, habits and rewards.
+The Habitica integration offers four actions to modify existing dailies, to-do's, habits and rewards. These actions allow you to update task details, configuration, and attributes after creation.

214-228: Improve attribute documentation consistency.

Consider these enhancements:

  1. Use consistent formatting for attribute names in descriptions
  2. Clarify task type distinctions
 | Data attribute         | Optional | Description                                                                                                                                             |
 | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| task                   | no       | The name (or task ID) of the daily you want to update.                                                                                                  |
+| task                   | no       | The name, task ID, or alias of the task you want to update. Applies to any task type (daily, todo, habit, or reward).                                  |

229-246: Enhance daily attributes documentation.

Consider adding more context and examples for complex attributes:

-| frequency              | yes      | Update the repetition interval of a daily.                                                                                              |
+| frequency              | yes      | Update the repetition interval of a daily. Valid values are "daily", "weekly", "monthly", or "yearly".                                  |
-| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats. A value of 0 means the daily will never be due (a 'Grey-Daily').           |
+| every_x                | yes      | Set the number of units (defined by frequency) after which the daily repeats. For example, with frequency="weekly" and every_x=2, the task repeats every 2 weeks. A value of 0 means the daily will never be due (a 'Grey-Daily'). |

261-269: Clarify valid values for habit attributes.

Add valid values for the up_down attribute:

-| up_down                | yes       | Update if the habit is good and rewarding (positive), bad and penalizing (negative), or both.                     |
+| up_down                | yes       | Update if the habit is good and rewarding (positive), bad and penalizing (negative), or both. Valid values: "up" (positive only), "down" (negative only), or "both". |

270-275: Specify the cost unit for rewards.

-| cost           | yes       | Update the cost of a reward. |
+| cost           | yes       | Update the cost of a reward in gold pieces (GP). |

276-276: Remove extra blank line.

Remove one of the consecutive blank lines to maintain consistent formatting.

🧰 Tools
🪛 Markdownlint

276-276: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between cbd75f5 and 88cd482.

📒 Files selected for processing (1)
  • source/_integrations/habitica.markdown (1 hunks)
🧰 Additional context used
🪛 Markdownlint
source/_integrations/habitica.markdown

276-276: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

🔇 Additional comments (1)
source/_integrations/habitica.markdown (1)

247-260: LGTM!

The todo-specific attributes are well-documented with clear descriptions.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
source/_integrations/habitica.markdown (1)

256-257: Improve formatting and clarity of specific attribute descriptions.

-| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats. A value of 0 means the daily will never be due (a 'Grey-Daily').           |
+| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats. A value of 0 means the daily will never be due (a 'Grey-Daily').        |
-| frequency              | yes       | Update the reset frequency of a habit's counter: daily at the start of a new day, weekly after Sunday night, and monthly at the end of the month. |
+| frequency              | yes       | Update the reset frequency of a habit's counter:
+                                    - daily: at the start of a new day
+                                    - weekly: after Sunday night
+                                    - monthly: at the end of the month |

Also applies to: 283-284

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 88cd482 and 7df6fba.

📒 Files selected for processing (1)
  • source/_integrations/habitica.markdown (1 hunks)
🔇 Additional comments (1)
source/_integrations/habitica.markdown (1)

227-230: LGTM! Clear and concise introduction.

The introduction effectively sets up the context for the task update actions.

source/_integrations/habitica.markdown Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (6)
source/_integrations/habitica.markdown (6)

227-230: Enhance the introduction for better clarity.

Consider expanding the introduction to provide more context:

 ### Task update actions
 
-The Habitica integration offers four actions to update the details and configuration of dailies, to-do's, habits, and rewards.
+The Habitica integration offers four service calls that allow you to modify existing tasks in your Habitica account. These services enable you to update the details and configuration of dailies, to-do's, habits, and rewards after they have been created.

237-244: Add examples to improve clarity of attributes.

Consider adding examples to make the attributes more clear:

 | config_entry           | no       | Select the Habitica account to update a task.                                              |
-| task                   | no       | The name or task ID of the task you want to update.                                        |
+| task                   | no       | The name or task ID of the task you want to update (e.g., "Exercise" or "123e4567-e89b"). |
-| rename                 | yes      | The new title for the Habitica task.                                                       |
+| rename                 | yes      | The new title for the Habitica task (e.g., "Morning Exercise").                           |
-| tag                    | yes      | Add one or more tags to the task. Non-existent tags will be created automatically.         |
+| tag                    | yes      | Add one or more tags to the task (e.g., "health", "morning"). Non-existent tags will be created automatically. |

249-250: Remove extra blank line.

There are multiple consecutive blank lines. Remove one of them to maintain consistent formatting.

🧰 Tools
🪛 Markdownlint

250-250: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


259-262: Clarify scheduling attributes with examples.

Consider adding examples to make the scheduling attributes more clear:

-| start_date             | yes      | Update the start date of a daily to define when it becomes active. Also determines the specific weekday or day of the month on which the habit repeats. |
+| start_date             | yes      | Update the start date of a daily to define when it becomes active (e.g., "2024-01-01"). Also determines the specific weekday or day of the month on which the habit repeats. |
-| frequency              | yes      | Update the repetition interval of a daily.                                                                                                              |
+| frequency              | yes      | Update the repetition interval of a daily ("daily", "weekly", "monthly", or "yearly").                                                                  |
-| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats. A value of 0 means the daily will never be due (a 'Grey-Daily').           |
+| every_x                | yes      | Set the number of days, weeks, months, or years after which the daily repeats (e.g., 2 for "every 2 days"). A value of 0 means the daily will never be due (a 'Grey-Daily'). |

287-288: Clarify the up_down attribute with examples.

Consider adding examples to make the up_down attribute more clear:

-| up_down                | yes       | Update if the habit is good and rewarding (positive), bad and penalizing (negative), or both.                     |
+| up_down                | yes       | Update if the habit is good and rewarding (positive, "up"), bad and penalizing (negative, "down"), or both ("up,down"). For example, "up" for exercise or "down" for smoking. |

294-296: Add example for the cost attribute.

Consider adding an example to make the cost attribute more clear:

-| cost           | yes       | Update the cost of a reward. |
+| cost           | yes       | Update the cost of a reward in gold pieces (e.g., 10 for "10 GP"). |
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 7df6fba and c3afd0a.

📒 Files selected for processing (1)
  • source/_integrations/habitica.markdown (1 hunks)
🧰 Additional context used
🪛 Markdownlint
source/_integrations/habitica.markdown

250-250: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

🔇 Additional comments (1)
source/_integrations/habitica.markdown (1)

269-282: LGTM!

The todo tasks update section is well-documented with clear descriptions for all attributes.

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved. Can be merged as soon as the parent PR gets merged.

@frenck frenck added the awaits-parent Awaits the merge of an parent PR label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaits-parent Awaits the merge of an parent PR Hacktoberfest An PR on this issue (or the PR itself) is eligible towards Hacktoberfest! has-parent This PR has a parent PR in a other repo next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants