Skip to content

feat: Add support for native GitHub media attachments #208

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
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

savokr-asana
Copy link

@savokr-asana savokr-asana commented Apr 22, 2025

Description
This PR introduces support for adding github attachments to corresponding asana task. Currently, it only happens on PR creation, will be fixed for PR updates as well soon.

Test
Added unit tests are passing together with extract_attachments function tested on real codez PR and video/images attachments.

Pull Request synchronized with Asana task
Pull Request: #208

@savokr-asana
Copy link
Author

savokr-asana commented Apr 23, 2025

Just found out one thing that attachments copy-pasted from local files are "encoded" as HTML tag even in markdown, so will need to add support for that as well, it will be quite easy and I will try to simplify current logic to rely only on html based text body instead of markdown.

Copy link
Collaborator

@suzyng83209 suzyng83209 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for missing this pull request for a while. All of the code looks good. I do think you need to fix some types but the test failures look transient so a re-run may resolve it.

Let me know when you want to deploy this change!

@asana-sgtm asana-sgtm bot assigned savokr-asana and unassigned suzyng83209 May 14, 2025
@savokr-asana
Copy link
Author

savokr-asana commented May 15, 2025

@suzyng83209 Thanks for the review! There is one thing still missing in the PR, and it's the update of attachments when a Github description/comment is updated. It's really important since the flow with git pr forces us to add attachments only after the initial PR is created, so in order to actually add them properly in asana, we should support the update of the task as well. To do it properly, you should probably create a dynamodb mapping with github pr -> asana attachment ids, but I was thinking of doing it in simpler way by fetching the current attachments names and comparing old vs new ones. I will try to work on it tomorrow and you can probably re-review the changes and try testing it as well.

Upd: Thought a little more about the "simpler" approach and I don't think it will work that good, so will try to implement a dynamodb thing instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants