Yobi Documentation

repository·master·Indexed 18 days ago

https://github.com/naver/yobi

Yobi is a web-based project hosting software designed to increase software productivity and quality. It features an issue tracker, bulletin boards, embedded Git/SVN support, and pull-request capabilities. The documentation covers installation via binary or source (JDK 7/8 and Play Activator), runtime configuration for home directories and ports, data backup, and user guides for managing groups, project members, and issue tracking using milestones and labels.

Tokens
10.3K
Snippets
19
Records
81
Agent score
63%

What's inside Yobi

  1. How the Watching mechanism works in Yobi

    master

    The Watching mechanism allows users to receive notifications whenever an object changes or receives a comment.

    User Actions

    • Watch: Clicking the Watch button adds the user to the "Explicit Watchers" list and removes them from the "Explicit Ignorers" list. Note: The user must have permission to read the object, otherwise Yobi returns 403 Forbidden.
    • Unwatch: Clicking the Unwatch button removes the user from the "Explicit Watchers" list and adds them to the "Explicit Ignorers" list. This action succeeds even if the user does not have permission to read the object.

    Automatic Watching

    Yobi automatically includes certain users as watchers of an object:

    • The author of the object.
    • The assignee of the object.
    • Users who have commented on the object.
    • Users who watch the project that the object belongs to.

    Note: If a user explicitly clicks the Unwatch button, they are removed from the watcher list even if they meet the automatic criteria above.

  2. Security considerations for Mailbox authentication

    master

    Mailbox uses the email address in the From header of a received email for authentication. It assumes this header is truthful.

    Risk: A malicious user could forge a From header to impersonate another user and create issues in private projects they cannot normally access.

    Mitigation: To secure your Yobi instance, your IMAP server must be configured to deny or reject any emails where the From header has been forged.

  3. How Mailbox fetches and handles emails

    master

    Mailbox is a service in Yobi that fetches emails from a configured IMAP server and automatically posts them as issues or comments.

    Fetching Logic

    • Folder Detection: Mailbox uses the uidvalidity property to determine if the configured IMAP folder is the same as the one previously used. This value is stored in the MAILBOX_LAST_UIDVALIDITY property.
    • New Email Detection: An email is considered "new" if its UID is greater than the value stored in the MAILBOX_LAST_SEEN_UID property.
    • Polling vs. Listening: Mailbox attempts to use the IMAP IDLE command to listen for new emails immediately. If the server does not support IDLE, Mailbox falls back to polling at the interval defined by application.mailbox.polling.interval.

    Posting Logic

    • Authorship: The author is determined by the sender's email address in the From header. If the sender is not a registered Yobi user, the email is ignored.
    • Project Routing: Mailbox determines the target project(s) by parsing the recipient's email address in the To header. It looks for the "detail part" after the plus sign in the local part (e.g., in yobi+owner/project@mail.com, the project is owner/project).
    • Replies and Comments: If an email is a reply (detected via In-Reply-To or References headers), Mailbox posts it as a comment on the original resource. It identifies the resource using the message-id and the resource path included in the detail part (e.g., issue_post/123).
    • Error Handling: If Yobi fails to post an email, it automatically replies to the sender with the reason and a help message.
  4. Fine-tune language detection with CSS classes

    master

    Highlight.js uses heuristics to detect languages. For short code fragments where detection might fail, you can explicitly set the language by adding a class to the <code> or <pre> element.

    Supported class patterns:

    • language-html
    • language-php
    • (or simply the language name like class="html")

    To prevent a fragment from being highlighted at all, use the no-highlight class.

    <!-- Explicitly set language -->
    <pre><code class="html">...</code></pre>
    
    <!-- Disable highlighting -->
    <pre><code class="no-highlight">...</code></pre>
  5. Specify language or disable highlighting via CSS classes

    master

    Highlight.js uses heuristics to guess the language, which can be inaccurate for short snippets. You can explicitly define the language or disable highlighting by adding specific classes to the <code> or <pre> element:

    • Specify language: Use classes like language-html or language-php (standard HTML5 names).
    • Disable highlighting: Use the class no-highlight.
    <!-- Explicitly set language -->
    <pre><code class="html">...</code></pre>
    
    <!-- Disable highlighting -->
    <pre><code class="no-highlight">...</code></pre>
  6. Understand the Access log format

    master

    The Access log follows the Apache HTTP Server Combined Log Format, with one addition: the processing time is appended to the end of every entry. The processing time represents the duration between when Yobi receives a request and when it sends the response.

    Format Details:

    • The Ident field is always filled with -.
    • If a request fails, the processing time is filled with -.
    • For chunked encoding, the processing time does not include the time taken to generate the response body (e.g., reading a file from disk and writing it to a stream).
    127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif" 200
    - "http://www.example.com/start.html" "Mozilla/4.08 [en] (Win98; I ;Nav)"
    70ms
  7. How Groups work in Yobi

    master

    A Group is an abstraction used to bind multiple projects together. Groups provide two main benefits:

    1. Visibility: You can view all projects belonging to a group at a glance on the group's page.
    2. Access Control: Once registered as a group member, you gain access authorizations to the projects within that group based on your membership role.
  8. Handle partial label responses via Content-Range header

    master

    When the number of returned items is restricted (either by your limit parameter or by Yobi's internal limits), Yobi includes a Content-Range header to indicate how many items were returned out of the total available matches.

    Important: Unlike standard HTTP/1.1 range requests, Yobi does not return a 206 Partial Content status code for these responses. The status code remains a standard success code (e.g., 200 OK).

    Header Syntax: Content-Range: items <number-of-items>/<complete-length>

    Example: If 8 items are returned out of a total of 10 matches, the header will be: Content-Range: items 8/10

  9. How to determine the recipient list for notifications

    master

    To correctly identify which users should receive a notification for an object, follow this two-step logic:

    1. Compile the initial list

    Include all users who fall into these categories:

    • The object's author.
    • The object's assignee.
    • Users who have commented on the object.
    • Users who watch the project the object belongs to.
    • Users who have explicitly watched the object.

    2. Filter the list

    Remove users from the compiled list if they meet either of these conditions:

    • They have explicitly ignored (unwatched) the object.
    • They do not have permission to read the object.

    3. Final Exclusions

    When an event occurs, do NOT send notifications to:

    • The user who triggered the event.
    • Users who watch the project but have specifically ignored the type of event occurring.