-
Notifications
You must be signed in to change notification settings - Fork 39
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
[FEATURE] Create Issues from Messages with Action Buttons #88
base: main
Are you sure you want to change the base?
[FEATURE] Create Issues from Messages with Action Buttons #88
Conversation
Hey @samad-yar-khan, as we discussed, I have added an action button, for quickly opening issues from messages, |
// TODO We need to download and upload the files to github first, else rocket.chat won't allow accessing images like below | ||
// const attachmentImageURLs: String[] = [] | ||
// const attachmentVideoURLs: String[] = [] | ||
// const settings = this.read.getEnvironmentReader().getServerSettings(); | ||
// const Site_Url = await settings.getValueById("Site_Url"); | ||
// if (message.attachments){ | ||
// message.attachments.map((attachment) => { | ||
// if (attachment.imageUrl){ | ||
// attachmentImageURLs.push(`### ${attachment.description?.split("|").pop()}\n![image](${Site_Url}/${attachment.imageUrl})`) | ||
// } | ||
// if (attachment.videoUrl){ | ||
// attachmentVideoURLs.push(`### ${attachment.description?.split("|").pop()}\n` + `${Site_Url}/${attachment.videoUrl}`) | ||
// } | ||
// }) | ||
// } | ||
|
||
// if (message.blocks){ | ||
// message.blocks.map((element) => { | ||
// if (element.type === BlockType.IMAGE){ | ||
// element = element as IImageElement | ||
// attachmentImageURLs.push(`### ${element.altText}\n![image](${element.imageUrl})`) | ||
// } | ||
// }) | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@henit-chobisa These comments need to be fixed, either by code or removed completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure Samad, I am still on my way to find someway for the images to be processed, what should I do in that case remove these comments and make another PR for that ??
Closes #87
Issue(s)
Many of the times, customers tend to share their queries directly in the chat, such as reporting a bug or something like a feature request, adding an action button in the list of actions beside a message that pops up a modal which helps in opening an issue can be a very good addition for a user convenience.
Acceptance Criteria fulfillment
SlashCommandContext
and also withAction Button Context
message.text
asdata.template
for theNewIssueModal
Shortcuts
<owner/repositor> | <issue>
, this will take the repository name and pass it to modal with the issue text as wellProposed changes
Issue Button
Issue without shortcut
Issue with shortcut