Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Add Matrix room shield to ReadMe #114

Merged
merged 2 commits into from
Jan 25, 2023
Merged

Add Matrix room shield to ReadMe #114

merged 2 commits into from
Jan 25, 2023

Conversation

GregSutcliffe
Copy link
Contributor

@GregSutcliffe GregSutcliffe commented Jun 22, 2022

This is a demo of using Shields.io to add direct links to our chat spaces from our README files. We could potentially make use of this in any of our repos, where an appropriate chatroom target exists. For this repo, the community working group room seemed appropriate.

These shields appear to render well on Galaxy too, since it ingests the README files, which should help direct users to the right place depending on what content they're using - gives maintainers more ways to signpost people, which I like.

Thoughts?

@samccann
Copy link

Since this is a demo, can you also explain how to format that url? I can't see obviously how to create one for docs for example.

Also, should this be on a separate line, not on the title line? See https://github.com/ansible-collections/community.general for how these links are usually added below the title.

@GregSutcliffe
Copy link
Contributor Author

GregSutcliffe commented Jun 23, 2022

@samccann gladly!

So the call is to the Shields.io API, with a bunch of query params. The docs are here but roughly it is:

  • Base URL: https://img.shields.io/matrix/ +
  • Room Alias: community:ansible.com + .svg +
  • Server to use for guest access: ?server_fqdn=ansible-accounts.ems.host
  • Optional Label (with spaces, etc, url-encoded): &label=Discuss%20at%20%23community:ansible.com
  • Optional Logo: &logo=matrix

Which is then wrapped in a Markdown image tag as usual: ![](url)

Does that help?

I have no objection to putting it below the line, sure. I was copying https://github.com/matrix-org/synapse/ which has them inline, but if that's our convention then fine :)

@GregSutcliffe
Copy link
Contributor Author

Updated to be on a newline

@samccann
Copy link

Should it work yet? it's saying room isn't world readable right now?

@GregSutcliffe
Copy link
Contributor Author

Hmm, possibly a config difference. This one seems to work:

@gundalow
Copy link
Contributor

Should it work yet? it's saying room isn't world readable right now?

I get toom not world readable or is invalid

@GregSutcliffe
Copy link
Contributor Author

GregSutcliffe commented Jun 27, 2022

Yeah, I am 99% sure this is a configuration issue. For example Pinakes is fine:

@GregSutcliffe
Copy link
Contributor Author

Seems to be working now shrug

Rich diff of the PR:
image

@Landrash
Copy link
Contributor

Landrash commented Jul 2, 2022

This is a great addition. It's small, out of the way and simplifies finding the appropriate room.

@acozine
Copy link
Contributor

acozine commented Jan 19, 2023

Looks like this dropped off the radar. Maybe we can bring it up next week in the community meeting? It looks like a nice addition.

@felixfontein felixfontein merged commit 5e39174 into main Jan 25, 2023
@felixfontein felixfontein deleted the matrix-shield branch January 25, 2023 19:35
@felixfontein
Copy link
Contributor

@GregSutcliffe and everyone else, thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants