How would something like Github Sponsors work? Lots of projects use a "sponsor us for $LARGE_SUM and we'll mention you in our readme and release notes" model.
Maybe advertising should be banned in stuff that you are not the author for. Google putting ads into their blog posts is fine, Google putting ads into the search result is not. So on a Github project, the maintainer can put adds, Github can not unless it's their project.