Conversation
Co-authored-by: jmservera <jmservera@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The implementation correctly resolves the reported missing-method failure and matches the existing caller’s data format.
Pull request overview
Adds the missing Jira attachment wrapper required to persist repository state in a Jira issue.
Changes:
- Encodes state content as UTF-8 bytes.
- Uploads it through Jira’s attachment API using an in-memory stream.
File summaries
| File | Description |
|---|---|
jiralib.py |
Implements Jira.attach_file for state-file uploads. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced (auto)
Note
Copilot is running an experiment and ran this review at Balanced.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
pewz
approved these changes
Sep 14, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Using the option
--state-issueis crashing the process. Here is the traceback from the crash:Traceback (most recent call last): File "/home/runner/work/_actions/maritiren/ghas-jira-integration/fix-attach-file-bug/cli.py", line 326, in <module> main() File "/home/runner/work/_actions/maritiren/ghas-jira-integration/fix-attach-file-bug/cli.py", line 323, in main args.func(args) File "/home/runner/work/_actions/maritiren/ghas-jira-integration/fix-attach-file-bug/cli.py", line 109, in sync jira_project.save_repo_state(repo_id, state, args.state_issue) File "/home/runner/work/_actions/maritiren/ghas-jira-integration/fix-attach-file-bug/jiralib.py", line 236, in save_repo_state self.jira.attach_file( ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Jira' object has no attribute 'attach_file'I based my fix on the function @jmservera added to PR #119.
I triggered the bug by enabling the
--state-issueoption as in this commit, and ensured the fix worked by testing the fix with the option still enabled.It posted this ticket to my test-Jira:
