Skip to content

Add prepareInvocation definition which contains a link to the item of interest#6409

Merged
aiday-mar merged 1 commit intomainfrom
favourable-coral
Oct 24, 2024
Merged

Add prepareInvocation definition which contains a link to the item of interest#6409
aiday-mar merged 1 commit intomainfrom
favourable-coral

Conversation

@aiday-mar
Copy link
Copy Markdown
Contributor

@aiday-mar aiday-mar commented Oct 24, 2024

fixes #6339
fixes #6340

@aiday-mar aiday-mar marked this pull request as ready for review October 24, 2024 09:05
@aiday-mar aiday-mar enabled auto-merge (squash) October 24, 2024 09:05
@aiday-mar aiday-mar requested review from alexr00 and lszomoru October 24, 2024 09:05
@aiday-mar aiday-mar merged commit 280dba1 into main Oct 24, 2024
@aiday-mar aiday-mar deleted the favourable-coral branch October 24, 2024 09:07
@vs-code-engineering vs-code-engineering Bot added this to the October 2024 milestone Oct 24, 2024
Comment thread package.json
Comment on lines +3320 to +3323
"itemType": {
"type": "string",
"description": "The type of the item in the notification - whether it is an issue or a PR"
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"itemType": {
"type": "string",
"description": "The type of the item in the notification - whether it is an issue or a PR"
},
"itemType": {
"type": "string",
"enum": [
"issue",
"pr"
],
"description": "The type of the item in the notification - whether it is an issue or a PR"
},

const type = parameters.itemType === 'issue' ? 'issues' : 'pull';
const url = `https://github.com/${parameters.owner}/${parameters.repo}/${type}/${parameters.itemNumber}`;
return {
invocationMessage: vscode.l10n.t('Fetching item [#{0}]({1}) from GitHub', parameters.itemNumber, url)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
invocationMessage: vscode.l10n.t('Fetching item [#{0}]({1}) from GitHub', parameters.itemNumber, url)
invocationMessage: type === 'issue' ? vscode.l10n.t('Fetching issue [#{0}]({1}) from GitHub', parameters.itemNumber, url) : vscode.l10n.t('Fetching pull request [#{0}]({1}) from GitHub', parameters.itemNumber, url)

Copy link
Copy Markdown
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

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

👏

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a prepareInvocation for summarize notification tool I wish the "Summarize notification with thread ID #...." included the Issue number as well

3 participants