#1101 Add dropdown select for # issue tag
Merged by pingou. Opened by atelic.
atelic/pagure feature/hash-issue  into  master

Download 1101.patch

Since the library we are currently using does not support multiple
delimiters in the same text area and has a very inactive dev,
change to use At.js.

Example1 (issue): http://i.imgur.com/yZYGamA.png
Example2 (user): http://i.imgur.com/jzh3SFa.png

  • Use @ to reference a user
  • Use # to reference an issue/pr
  • NOTE: when using markdown formatting for headers, the dropdown will
    still appear. This is consistent with behavior in github and other apps
    though

@atelic, It appears that we are using #s just to get the issues but i guess we might want to mention the prs as well. One may also want to mention a pr in an issue and an issue in a pr.

rebased

@vivekanand1101, okay, it now will look up both issues and pr and be able to mention them on both pages

Does it report opened and closed ticket/PR? Should the order matter or do we keep by id?

It looks like the pull request endpoint only returns open ones, so it will have to make 3 different requests for PRs (open, closed, merged) but the issues endpoint accepts status=all does that sound correct? Looking over the pull request endpoint, if status is None then no filter will be added, so should I add something like this to the end point: https://paste.fedoraproject.org/386851/14078146/

Ordering by id seems best to me.

rebased

@pingou, I tested and the most recent code works with Merged, Open, and Closed PRs and with Open and Closed issues.

I'll try to test it, but code looks good :)

rebased

Looks real nice and seems to be working fine.

Just, I ran into an alert('hi') a couple of times, when trying to do #3y then removing the y, ever seen that?

Hmm, I haven't seen that and am having trouble reproducing. I don't see alert('hi') in the source anywhere either. fgrep -r 'alert(' * gave me this: https://paste.fedoraproject.org/387095/14673798

Hmm, I haven't seen that and am having trouble reproducing. I don't see alert('hi') in the source anywhere either.

Yes, I had the same idea and the same results, this is what I see: http://img.susepaste.org/95529984
(I used firebug to search for alert(), the file name seems odd :-s

Is is possible this is an extension? The file name looks like how firebug handles functions generated from an eval(): https://github.com/firebug/firebug/issues/7917.

This doesn't show up for me when searching in Chrome dev tools or in firebug:

rebased

You fixed the issue page but not the PR one

rebased

Looks good to me and works fine, thanks! :)

Pull-Request has been merged by pingou

Don't know why, but it doesn't seem to work here

@vivekanand1101, that doesn't work because it's parsing the # at the beginning of a line as a markdown header. I mentioned this in the PR description here: https://pagure.io/pagure/pull-request/1101

ah, sorry to ping. @atelic

No problem, @vivekanand1101!

Metadata