From 549f3e45acb0374dadbfb6d0f7ae3de5b4fb585b Mon Sep 17 00:00:00 2001 From: Pavel Fateev Date: Thu, 2 Jan 2025 17:45:07 -0800 Subject: [PATCH] reorganize to favor cloud --- .../assignee_from_schedule/README.md | 89 ++++--------------- 1 file changed, 17 insertions(+), 72 deletions(-) diff --git a/jira_google_calendar/assignee_from_schedule/README.md b/jira_google_calendar/assignee_from_schedule/README.md index 8d862aba..a43a679b 100644 --- a/jira_google_calendar/assignee_from_schedule/README.md +++ b/jira_google_calendar/assignee_from_schedule/README.md @@ -9,88 +9,33 @@ categories: ["DevOps"] This project automates the process of assigning Jira issues based on a shared Google Calendar. The workflow checks the current on-call person from the Google Calendar and assigns newly created Jira issues to them. -## Benefits - -- **Focus on what matters**: Write code that focuses on the desired outcome, not the underlying infrastructure. -- **Flexibility**: Implement your own authorization flow or use the one that works out of the box. -- **Extensibility**: Easily add additional steps or integrations. - ## How It Works -1. **Trigger**: A new Jira issue in the designated Jira project (specified in [`autokitteh.yaml`](./autokitteh.yaml)) -2. **Check Calendar**: The program checks the shared Google Calendar to identify the current on-call person. -3. **Assign Issue**: The program assigns the newly created Jira issue to the current on-call person. - -### Calendar Example - -![Calendar Example](./images/calendar_example.png) - -The image above illustrates a sample Google Calendar used in this workflow. Each event on the calendar represents an all-day on-call shift for a team member. The workflow checks this calendar to determine the current on-call person, which is then used to automatically assign newly created Jira issues to the person scheduled during that time. - -## Installation and Usage +1. Receive new Jira issue in the designated Jira project +2. Check the shared Google Calendar to identify the current on-call person +3. Assign the newly created Jira issue to the current on-call person -- [Install AutoKitteh](https://docs.autokitteh.com/get_started/install) +## Cloud Usage (Recommended) -### Configure integrations +1. Initialize your connections through the UI +2. Edit the `jira_issue_created` trigger, in the "TRIGGERS" tab, under the "Actions" column +3. Replace `JIRA_PROJECT_KEY` with your Jira project key +4. Set the `CALENDAR_ID` project variable to the ID of the shared Google Calendar +5. Deploy the project > [!IMPORTANT] -> The `autokitteh.yaml` file includes environment variables for the Jira and Google Calendar connections that need to be configured. - -Ensure you have set up the required integrations: - -- [Atlassian Jira](https://docs.autokitteh.com/integrations/atlassian) -- [Google Calendar](https://docs.autokitteh.com/integrations/google) - -### Clone the Repository - -```shell -git clone https://github.com/autokitteh/kittehub.git -cd kittehub/jira_google_calendar/assignee_from_schedule -``` - -Alternatively, you can copy the individual files in this directory. - -### Run the AutoKitteh Server +> Ensure all connections (Jira, Google Calendar) are properly initialized before the workflow starts running. -Simply run this command: +## Trigger Workflow -```shell -ak up --mode dev -``` - -### Apply Manifest and Deploy Project - -1. Navigate to the `assignee_from_schedule` directory: - -```shell -cd jira_google_calendar/assignee_from_schedule -``` - -2. Apply manifest and deploy the project by running the following command: - -```shell -ak deploy --manifest autokitteh.yaml -``` - -The output of this command will be important for initializing connections in the following step if you're using the CLI. - -For example, for each configured connection, you will see a line that looks similar to the one below: - -```shell -[exec] create_connection "assignee_from_schedule/jira_connection": con_01j36p9gj6e2nt87p9vap6rbmz created -``` - -`con_01j36p9gj6e2nt87p9vap6rbmz` is the connection ID. +Once deployed, the workflow is triggered by the creation of a new Jira issue, which prompts the assignment to the current on-call person according to the shared Google Calendar. -### Initialize Connections +## Calendar Example -Using the connection IDs from the previous step, run these commands: +![Calendar Example](./images/calendar_example.png) -```shell -ak connection init jira_connection -ak connection init google_calendar_connection -``` +The image above illustrates a sample Google Calendar used in this workflow. Each event on the calendar represents an all-day on-call shift for a team member. The workflow checks this calendar to determine the current on-call person, which is then used to automatically assign newly created Jira issues to the person scheduled during that time. -### Trigger the Workflow +## Self-Hosted Deployment -Once deployed, the workflow is triggered by the creation of a new Jira issue, which prompts the assignment to the current on-call person according to the shared Google Calendar. +Follow these [detailed instructions](https://docs.autokitteh.com/get_started/deployment) to deploy the project on a self-hosted server.