You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [x] fix `go-github` version mismatch across packages.
- [x] Define Label Email command.
- [x] Define struct for OrderData.
- recipient email address
- order id
- [ ] Fetch issue `github.event.issue.number`.
- [x] Write function
- [x] Create mock GET issue data
- [x] Add route to routeTable
- [ ] Reevaluate
- Does this need testing?
- [ ] Write test(s) for function
- [ ] Implement route in mock github API server
- [x] Convert Github Issue body markdown to HTML
- [x] Use `yuin/goldmark` package
- [x] Extract recipient order data from HTML
- [x] Extract Order ID from second paragraph
- [x] Extract Billing Address from table with "Billing Information"
- [x] Write test(s)
- [x] Extract recipient order data from markdown (Regexp)
- [x] Write function(s)
- [x] Write test(s)
- [ ] Email CC?
- [ ] Prepare email body from template.
- [x] Write functions
- [ ] Write test(s)
- [ ] Refactor template file path logic.
- should not be hardcoded
- [x] Make API request to Mailgun endpoint.
Description
When a specific label is added to an issue, send an email to the address in listed in the email body.
Requirements
An email is sent automatically when a label is added to an issue.
Receiver email address and other information should be retrieved from the issue body.
Email subject and body differ based on label added.
Growing / in Preparation
Shipping
invalid
Outline
Subscribe to github issue label event on Stock-Center-Orders
Extract receiver information from the issue body.
Email Address
Order ID
Generate Email subject on body from template using receiver information.
Send an email from some address; dictybase@northwestern.edu
sequenceDiagram
actor Richard
participant Stock-Center-Orders-repo
participant gha-runner
participant dictybase-docker/github-actions
participant mailgun
actor Order Recipient
Richard->>Stock-Center-Orders-repo: Adds label to issue
Stock-Center-Orders-repo->>gha-runner: Label event triggers workflow to run on
gha-runner->>dictybase-docker/github-actions: Checks out code
dictybase-docker/github-actions->>mailgun: Sends API request to
mailgun ->> Order Recipient: sends email to
Loading
Testing
There is a Stock-Center-Orders test repository that can be used for testing?
Description
When a specific label is added to an issue, send an email to the address in listed in the email body.
Requirements
Outline
Stock-Center-Ordersdictybase@northwestern.edusequenceDiagram actor Richard participant Stock-Center-Orders-repo participant gha-runner participant dictybase-docker/github-actions participant mailgun actor Order Recipient Richard->>Stock-Center-Orders-repo: Adds label to issue Stock-Center-Orders-repo->>gha-runner: Label event triggers workflow to run on gha-runner->>dictybase-docker/github-actions: Checks out code dictybase-docker/github-actions->>mailgun: Sends API request to mailgun ->> Order Recipient: sends email toTesting
There is a Stock-Center-Orders test repository that can be used for testing?
Approaches
Github Webhooks
Pros:
event-messengerCons:
Github Actions
Pros:
Cons:
event-messengerUnknowns
How will the project be organized? Where should it be kept?
Is using Github Webhooks viable?
What is our
event-messengerservice used for? Can it be used for the project?How does email even work?