xibz
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Ticket Events ## Motivation Tickets are often entry points for new work. This includes new features, bug fixes, etc. Ticket events will allow us to track the complete lifecycle of a code change from inception to deployment and also give us the ability to extract metrics from this lifecycle. ## Proposal ### Ticket Propagation Tickets will enter the CDEvents ecosystem through the *ticket.created* event. Tickets will then need to be linked to the CI/CD lifecycle of a change. The most intuitive place to do that is at the start of the CI process. This means that whatever source control system that is being used would need some definition on how to persist the ticketing metadata to an actual CDEvent. One way to do this is by having a standard around commits and/or pull requests. Below illustrates an example on what a commit may look like which allows for parsing of the ticketing information which can be used for some CDEvent. ``` jira:project-123 addresses some bug This commit fixes an issue around whitespace in that prior to this we considered whitespace as important, which causes comparing of string to be not equal when they should have been. ``` This would allow the source control system or subsystem to create a CDEvent to persist this data using links. ```json { "context": { "version": "0.3.0", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/us-east1", "type": "dev.cdevents.change.merged.0.1.2", "links": [ { "link_type": "RELATION", "link_kind": "TICKET", "target": { "subjectId": "project-123" }, "tags": { "source": "jira" } } ], "timestamp": "2023-03-20T14:27:05.315384Z" }, "subject": { "id": "PR-1", "source": "/event/source/PR-1", "type": "change", "content": { "repository": { "id": "TestRepo/TestOrg", "source": "https://example.org" } } } } ``` ### Schema #### ticket.created Ticket created is a CDEvent that can be sent when someone opens/creates a ticket within some ticketing system ```json { "context": { "version": "0.4.0-draft", "id": "5ca4eda2-5472-4fac-b07d-9eb7d5d3002a", "source": "/event/source/123", "type": "dev.cdevents.ticket.created.0.1.0", "timestamp": "2023-10-26T19:44:37+00:00Z" }, "subject": { "id": "project-123", "source": "/ticket_system", "type": "ticket", "content": { "summary": "Fix bug in service", "type": "BUG", "group": "Jenkins Backend", "creator": "App User", "assignee": "App Dev", "priority": "HIGH", "labels": ["feature", "label2"], "milestone": "123" }, }, "customData": {}, } ``` | field | description | example | | ----------- | ----------- | ----------- | | id | Unique id within the ticketing system | jira-123 | | summary | The summary that the user provided upon ticket creation | base64 encodings can fail regex expressions | | type | This is an enum, but also a freeform value, that associates the ticket type | `BUG`, `FEATURE`, `SOMECUSTOMSTRING` | | group | Who the ticket is currently assigned to | Backend | | creator | The original ticket author | John Smith | | assignee | Who is currently investigating the ticket | App Dev | | priority | The priority that is associated with the ticket which can indicate the importance of the ticket | `HIGH`, `MEDIUM`, `LOW`, `SOMECUSTOMSTRING` | | labels | Labels associated to the ticket | feature, label2 | | milestone | An ID that represents goal for when this ticket is to be completed. For example, github uses a number that links to a milestone which includes all issues and PRs associated to that milestone along with the due date for the milestone. | 123, sprint-123, Q1 | #### ticket.updated The ticket updated event may be sent when a ticket has been updated in some ticketing system and can reflect what changed within the ticket. ```json { "context": { "version": "0.4.0-draft", "id": "5ca4eda2-5472-4fac-b07d-9eb7d5d3002a", "source": "/event/source/123", "type": "dev.cdevents.ticket.updated.0.1.0", "timestamp": "2023-10-26T19:44:37+00:00Z" }, "subject": { "id": "ticket-123", "source": "/ticket_system", "type": "ticket", "content": { "changed": [ { "field": "group", "from": "Jenkins Backend", "to": "Jira Backend" } ], "author": "John Smith" }, }, "customData": {}, } ``` | field | description | example | | ----------- | ----------- | ----------- | | changed | Are the associated changes to the ticket | | | author | Is the person who authored the updates | John Smith | #### ticket.closed ```json { "context": { "version": "0.4.0-draft", "id": "5ca4eda2-5472-4fac-b07d-9eb7d5d3002a", "source": "/event/source/123", "type": "dev.cdevents.ticket.closed.0.1.0", "timestamp": "2023-10-26T19:44:37+00:00Z" }, "subject": { "id": "ticket-123", "source": "/ticket_system", "type": "ticket", "content": { "resolution": "completed", "author": "John Smith", }, }, "customData": {}, } ``` | field | description | example | | ----------- | ----------- | ----------- | | resolution | Indicates the closing status of the ticket | `COMPLETED`, `CANCELED`, or any valid string | | author | Is the person who authored the updates | John Smith | ### Use Cases #### Observability Observability is really important for teams and businesses. The idea with the ticket proposal is that it allows interested users to see and gather metrics around tickets to when the fix was deployed. A good example of this is let's assume we have a bug fix. The bug fix gets created as a ticket. The assigned engineer will then look at the ticket, and do further investigation. Once the bug has been reproduced and identified, the engineer will create a pull request for the fix. This will make its way to various environments and eventually be deployed to production. It is a lot of work to gather these information to build metrics. In the example above, we would manually need to see when the ticket was created, when the PR was merged, what artifact the commit was apart of, and then lastly track when it was deployed to production. These steps can be very involved, and having CDEvents introduce the ticket concept allows for these metrics to be easily retrieved and looked at. #### Interoperability with Ticketing Systems Ticket events could be used to take some action when a ticket is updated. For instance, when a ticket is assigned or transitioned to a different status. Prior to this tickets acted as individual systems that required manual work in maintaining any ticket's status. With this feature, it allows for ticketing systems to choose to hook into the CI/CD lifecycle. #### TODO How do we associate ticket events to other CDEvents?

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully