From 4314787194b555d59dbc9a34f260ec16a3146e8d Mon Sep 17 00:00:00 2001 From: Pavel Fateev Date: Thu, 2 Jan 2025 17:23:04 -0800 Subject: [PATCH 1/2] reorganize to favor cloud --- .../deadline_to_event/README.md | 83 ++++--------------- 1 file changed, 14 insertions(+), 69 deletions(-) diff --git a/jira_google_calendar/deadline_to_event/README.md b/jira_google_calendar/deadline_to_event/README.md index 77b98e10..0a85bb3a 100644 --- a/jira_google_calendar/deadline_to_event/README.md +++ b/jira_google_calendar/deadline_to_event/README.md @@ -9,82 +9,23 @@ categories: ["DevOps"] This project automates the process of creating Google Calendar events based on Jira issue creation. When a new Jira issue is created, the workflow automatically generates a Google Calendar event with a deadline to ensure that the required tasks are completed on time. -## Benefits - -- **Simplicity**: In a few lines of code, you have a functional workflow that is authenticated and integrated, allowing two applications to communicate with each other. -- **Flexibility**: Use this as a starting point. Add integrations or change the trigger. It's open source and free, so there are no limits to what you can do. - ## How It Works -1. **Trigger**: The workflow is triggered by the creation of a new Jira issue. -2. **Create Calendar Event**: The program creates a Google Calendar event based on the Jira issue details, including the due date and description. -3. **Notify**: The event is created in the Google Calendar, and attendees are notified. +1. Receive new Jira issue creation +2. Create Google Calendar event using Jira issue details like due date and description +3. Notify attendees when the event is added to Google Calendar -## Installation and Usage +## Cloud Usage (Recommended) -- [Install AutoKitteh](https://docs.autokitteh.com/get_started/install) - -### 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. 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/deadline_to_event -``` - -Alternatively, you can copy the individual files in this directory. - -### Run the AutoKitteh Server - -Simply run this command: - -```shell -ak up --mode dev -``` - -### Apply Manifest and Deploy Project - -1. Navigate to the `deadline_to_event` directory: +> Ensure all connections (Jira, Google Calendar) are properly initialized before the workflow starts running. -```shell -cd deadline_to_event -``` - -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 "deadline_to_event/google_calendar_connection": con_01j36p9gj6e2nt87p9vap6rbmz created -``` - -`con_01j36p9gj6e2nt87p9vap6rbmz` is the connection ID. - -### Initialize Connections - -Using the connection IDs from the previous step, run these commands: - -```shell -ak connection init my_jira -ak connection init my_google_calendar -``` - -### Trigger the Workflow +## Trigger Workflow The workflow is triggered by the creation of a new Jira issue, which prompts the creation of a Google Calendar event according to the issue's details. @@ -92,3 +33,7 @@ The workflow is triggered by the creation of a new Jira issue, which prompts the - Attendees are hard-coded and arbitrary. - Error handling is not implemented for demo purposes. For example, if the Jira issue is missing any of the required fields (e.g., `description`, `duedate`), the program will not fail gracefully. + +## Self-Hosted Deployment + +Follow these [detailed instructions](https://docs.autokitteh.com/get_started/deployment) to deploy the project on a self-hosted server. From 549f3e45acb0374dadbfb6d0f7ae3de5b4fb585b Mon Sep 17 00:00:00 2001 From: Pavel Fateev Date: Thu, 2 Jan 2025 17:45:07 -0800 Subject: [PATCH 2/2] 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.