[DEPRECATED] The Github Linkback Plugin

official

(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?


#38

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.


#40

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: .


(Robin Ward) #41

I could be mistaken, but you don’t give it access to a particular repo, just “public repos.” I believe any repo that it can post in should work, but admittedly I have not confirmed this.


#42

Yaaaa, well i got bored today after 2 beers and got this working: Allow all user repositories wildcard by TheBestPessimist · Pull Request #3 · discourse/discourse-github-linkback · GitHub.

Warning: no prior discourse/ruby knowledge here.

I gotta say tho:
Ruby feels a lot like Perl:
it uses both do end and { },
you can do
s = "a" + "b"
or
s = "a" "b"
or in a few other ways…

Ruby feels like it has waaay to many redundant features. :worried: (hence comparison to Perl).


#43

I’m not sure exactly what else should be updated (the modifications work on my self hosted discourse), so could you please guide me a little bit?


#44

@zogstrip i have no idea how to do the tests. all my changes were done “by hand” and i just pulled from my branch whilst doing launcher rebuild app .

i see that there are tests in spec/lib/github_linkback_spec.rb, but i don’t have any clue how to extend that and/or how to run them afterwards.


(Régis Hanol) #45

A good starting place is to setup a dev environment locally.


#46

somehow (3 :beers:) i missed that :blush:


(Benjamin Lupton) #47

Can it be made possible that this step is optional:

Finally, add the projects you wish to post to in the github linkback projects site setting in the formats:

  • username/repository for specific repositories
  • username/* for all repositories of a certain user

I think if nothing is specified, it should use all organisations and all projects linked to that user account.


#48

Might i just say “Pull requests are welcome” ?

(in all fairness though, username/* is really not that difficult to do since it’s done only once)


(Diego Barreiro) #49

Is possible to link Issues too?


#50

(Jeremy M) #51

As it’s been a few months, just following up on if there a way for this to work with Organizations, or do we have to add each repo manually?


(Robin Ward) #52

For now you still have to add each repo manually.


(Jeremy M) #53

Got it. Appreciate the work that has gone into this!


(Daniela) #54

This plugin is no longer supported, please migrate to GitHub - discourse/discourse-github


(Jeff Atwood) closed #63