Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GitHub push event posts in Zulip #37

Open
snomos opened this issue Oct 25, 2023 · 6 comments
Open

Improve GitHub push event posts in Zulip #37

snomos opened this issue Oct 25, 2023 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@snomos
Copy link
Member

snomos commented Oct 25, 2023

Background: the commit messages in Zulip we have now is not very informative, and lack essential information to do light-weight code reviews in the way we used to do when using svn. At that time, we received an email for each commit, containing a list of all changed files + a diff for the first 1000 lines or so.

Now I stumbled across the following: https://github.com/zulip/github-actions-zulip#readme

Using it we can build an action that sends a message to Zulip that contains exactly what we want. The most wanted content is:

  • full commit message, not only title
  • list of all files in each commit
  • diffs (or some of it, at least) for each file? Needs to be evaluated, can easily be too much

In addition, we want to include what is already now present:

  • the push hash and link
  • each of the commits, with hash and links
  • user name of user pushing
  • number of commits in push
  • name of branch being pushed to
  • stream as a function of repo name
  • topic derived from repo + branch

There is an absolute limit of 10 000 bytes in each post. And we don't want to spam our Zulip streams too much.

@snomos snomos added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 25, 2023
@snomos
Copy link
Member Author

snomos commented Oct 25, 2023

A test GH Action is added to lang-zxx in giellalt/lang-zxx@319efdf.

And it works!

Now we just have to fill it with useful content 🙂

@snomos
Copy link
Member Author

snomos commented Oct 25, 2023

Maybe this to get the list of changed files: https://github.com/marketplace/actions/changed-files

@snomos
Copy link
Member Author

snomos commented Oct 25, 2023

And this is how to get the username for the push event: https://github.com/orgs/community/discussions/25196

@snomos
Copy link
Member Author

snomos commented Oct 26, 2023

(kvifor skriv eg på engelsk, eigentleg???)

Nokre tinget kom til.å tenkja på:

  • meldinga i Zulip basert på dette oppsettet kjem seinare enn standardmeldinga frå GitHub vi har no. Eg går ut frå at det er fordi ei slik handling (Action) krev meir prosessering.
  • eg hadde eigentleg tenkt at vi slår av GitHub-meldingane nesten heilt, og berre nyttar denne i staden, men då må vi gjenskapa all funksjonalitet i koden for handlinga - det er kanskje berre dobbelt og unødvendig arbeid

Dermed føreslår eg dette:

  • vi lar noverande innsjekkingsmeldingar stå (men avgrensar kanskje andre meldingar frå GH)
  • vi konsentrerer oss på å gje den manglande informasjonen

Det betyr altså at meldingane i GitHub skulle kunne vera noko i stil med dette oppsettet:

  • generisk push-melding som no, med den informasjonen som finst der (treng dermed ikkje gjenskapast)
  • separat melding frå handlinga eg viste til, med full innsjekkingstekst, alle filnamn, og ev ein avgrensa diff
  • vi avgrensar alle andre GH-meldingar til berre check-meldingar

Då vil det koma to meldingar for kvar push, men dei skulle i så fall vera komplementære. Tankar om det?

@snomos
Copy link
Member Author

snomos commented Oct 26, 2023

No er ein fyrste versjon på plass i lang-zxx. Det er mange manglar enno, men ein får i alle fall ei liste over alle filene som er inkludert i (siste) innsjekking. Om dette er eit nyttig tillegg til dei push-meldingane som kjem frå før, så rullar eg ut til alle språk. Kva synest de, @flammie @albbas og @Phaqui ?

@snomos
Copy link
Member Author

snomos commented Oct 27, 2023

Eg køyrer ut den versjonen vi har no, og så kan vi arbeida vidare med han etter kvart. Eg trur meldingane vi generer no er nyttige som dei er, sjølv med dei avgresningane som finst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants