-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add Linear action item syncing for incidents #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
spalmurray
wants to merge
17
commits into
main
Choose a base branch
from
spalmurray/linear-action-items
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
16340af
Add Linear action item tracking via link to firetower on issue
spalmurray 498b2f9
add base url to ci toml
spalmurray c5bc77a
Add trailing slash to incident URL for exact Linear attachment matching
spalmurray 4b50158
Remove duplicate firetower_base_url declarations
spalmurray 84d40c4
Cache _get_incident result and add IncidentPermission to SyncActionIt…
spalmurray 08cfa71
Scope action item update_or_create to include incident
spalmurray 4b0f3b6
Add Bearer prefix to Linear API Authorization header
spalmurray a18bec1
Fix trailing slash mismatch and update_or_create lookup for action items
spalmurray 002e1e4
Paginate Linear attachments query to fetch all results
spalmurray a2283c9
Add trailing slash to incident URLs to prevent prefix matching
spalmurray 60fa8f8
Rename admin method to avoid shadowing sync_action_items_from_linear …
spalmurray 338c551
Add explicit permission_classes to ActionItemListView
spalmurray a808bc8
Add pagination safety guards in get_issues_by_attachment_url
spalmurray fa3fcbe
Update throttle timestamp on Linear API failure to prevent retry storms
spalmurray 09a6332
Move sync endpoint to /api/ path
spalmurray 0cb20f9
Fix example config base URL back to localhost
spalmurray 0e9d334
Fix CI config base URL back to localhost
spalmurray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
74 changes: 74 additions & 0 deletions
74
src/firetower/incidents/migrations/0015_add_action_item_model.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # Generated by Django 5.2.12 on 2026-04-01 19:53 | ||
|
|
||
| import django.db.models.deletion | ||
| from django.conf import settings | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("incidents", "0014_add_total_downtime"), | ||
| migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name="incident", | ||
| name="action_items_last_synced_at", | ||
| field=models.DateTimeField(blank=True, null=True), | ||
| ), | ||
| migrations.CreateModel( | ||
| name="ActionItem", | ||
| fields=[ | ||
| ( | ||
| "id", | ||
| models.BigAutoField( | ||
| auto_created=True, | ||
| primary_key=True, | ||
| serialize=False, | ||
| verbose_name="ID", | ||
| ), | ||
| ), | ||
| ("linear_issue_id", models.CharField(max_length=255, unique=True)), | ||
| ("linear_identifier", models.CharField(max_length=25)), | ||
| ("title", models.CharField(max_length=500)), | ||
| ( | ||
| "status", | ||
| models.CharField( | ||
| choices=[ | ||
| ("Todo", "Todo"), | ||
| ("In Progress", "In Progress"), | ||
| ("Done", "Done"), | ||
| ("Cancelled", "Cancelled"), | ||
| ], | ||
| default="Todo", | ||
| max_length=20, | ||
| ), | ||
| ), | ||
| ("url", models.URLField()), | ||
| ("created_at", models.DateTimeField(auto_now_add=True)), | ||
| ("updated_at", models.DateTimeField(auto_now=True)), | ||
| ( | ||
| "assignee", | ||
| models.ForeignKey( | ||
| blank=True, | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| related_name="action_items", | ||
| to=settings.AUTH_USER_MODEL, | ||
| ), | ||
| ), | ||
| ( | ||
| "incident", | ||
| models.ForeignKey( | ||
| on_delete=django.db.models.deletion.CASCADE, | ||
| related_name="action_items", | ||
| to="incidents.incident", | ||
| ), | ||
| ), | ||
| ], | ||
| options={ | ||
| "ordering": ["created_at"], | ||
| }, | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.