[DEPRECATED] The Github Linkback Plugin


(Robin Ward) #21

You should make sure the token has the permissions outlined in the project README. Those are the only ones we have running here on meta so it should work.

This is a long existing bug on Github where it streams in notifications but is not clear if it showed them already. It’s a side effect of them using PJAX instead of a proper front end framework :stuck_out_tongue:

(Daniela) #22

Well, my problem was that I set the permission clicking on repo:

enabling all subheadings.

This way the plugin does not work, enabling only the public_repo scope works fine :star_struck:.

I suggest a little update on the github README the make the requirement more clear (for newbies like me) :yum:

(Sam Saffron) #23

Can you submit a pr?

(Daniela) #24

Done. Adding “only” was very difficult :joy::rofl:

(Lukas Winkler) #25


Thanks for the great plugin.

Is there a reason why GitHub issues aren’t linked back? Would it be possible to add a configuration option for this?

I think it would be quite useful to see which other users on the forum are having the same issue (and maybe more information on how to reproduce it)

(Jeff Atwood) #26

We don’t use GitHub issues and have no plans to… ever. Discourse fills that role for us.

(Florian Schmaus) #27

Would be great if the help text would mention this
So instead of

List of projects to link back from

something like

List the project to link back from in the format ‘user/repo’.

(Lukas Winkler) #28


I just noticed another potential issue with the plugin.

I just posted a changelog with a list of all closed pull requests since the last release. And of course I forgot the bot until I have posted and it of course commented on all pull requests.

While this was my mistake (even though a setting to ignore some posts would be nice), this means that any forum user could spam the GitHub issue tracker with hundreds of posts just by posting on the forum. Maybe there should be a maximum of pull requests that can be mentioned in a single post.

(Jeff Atwood) #29

I am forever a fan of rate limits, everywhere, all the time!!

(misterdude) #30

Are there any plans to support this plugin for GitHub Organizations?

(Robin Ward) #31

I’m not sure what needs to change for that?

(misterdude) #32

OK, I see where I was confused. It seems the plugin only works for commits and pull requests. We use Discourse to track our user’s feature requests, which usually show us as issues, which is why it seemed to not be working for me.

Sorry for wasting your time.

(Adam Warner) #33

I’m guessing this does not include edits? An example, we have an announcement post with a link to a Pull Request, every time we’ve made edits to the announcement post, the linkback gets posted to Github… is there any way we can get around this? Looked at the source, and can just about follow it, but I don’t know enough about Ruby to tinker…!


(Robin Ward) #34

That is not supposed to happen. We set a custom field on the post when the link is extracted and should skip it the next time that link is seen.

Are you editing the link too when you edit the post?

(Adam Warner) #35

Ah yeah, that reminds me, should I be able to find the custom field in the Settings below?

I saw the part in the source about setting the custom field, but I guess we will need to look in the database to see it?

An example of a post where we’ve seen this happening:

And the relevant posts from the github-bot here:

There was a post I thought I had seen it happen on last night, but I cannot verify that now that I’m looking with fresh eyes…


Edit: No, the link is not being edited.

Edit2: As a developer myself, I fully appreciate that the issue is likely in how we’re using it, as opposed to how it is written!

(Gerhard Schlager) #36

I’m seeing the same problem at https://github.com/discourse/discourse/pull/5640
The post was edited multiple times in the first 5 minutes.

(Anton) #37

Will it work with Private GitHub repos?


Q: is there a possibility to have just the username instead of [username/repository]?

I want this so that i can just link to any of my repositories w/o any more headache.

Plus: the plugins “box” where i have to enter all my “projects” (in the format above) is difficult to use if i have 60 repos.

And one more question: how can i link to other repositories? for example a repo of my friend when we’re working together on his project?

(Robin Ward) #39

You could add your friend’s project to the site setting if you want and it should work.

In terms of having it match just on username, that is not a bad idea and I would accept a PR that handles that case.


I don’t exactly understand how github permissions work, but i expect that since i created a token for public repo, that only works on my repositories, not others. Or could i just “link” to any repo of anyone?

I have no knowledge of discourse or its inner workings so there’s no chance i’m able to submit it :frowning: .