This should do it:
// #popclip
// name: GH Issue
// language: javascript
const text = popclip.input.text;
const url = `https://github.com/repo/issue/${encodeURIComponent(text)}`;
const md = `[${text}](${url})`;
popclip.copyText(md);
(The above block is an extension snippet — select it then click “Install Extension” in PopClip.)