Skip to content

Instantly share code, notes, and snippets.

@jaber-mtl
Forked from delowar-mtl/GitHub semi-automation.md
Last active March 21, 2023 04:58
Show Gist options
  • Save jaber-mtl/585a39c8dff32296aed73be8216c16bd to your computer and use it in GitHub Desktop.
Save jaber-mtl/585a39c8dff32296aed73be8216c16bd to your computer and use it in GitHub Desktop.

I used jquery. We will use jQuery Injector chrome extension to load jQuery.

Steps
var commits = $(".TimelineItem.TimelineItem--condensed:first-child").children(".TimelineItem-body").children("ol").children();

var activities = "";
$.each(commits, function(index, commit) {
  let text = $(commit).children("div:first-child").children("p:first-child").children("a").html();
  let url = "https://github.com"+$(commit).children("div:first-child").children("p:first-child").children("a").attr("href");

    activities += (index + +1)+". "+text+" "+url+"\n"
});

console.log(activities)

Expected output:

1. Profitability Report PDF Done https://github.com/magnetismtech/hr-lines/commit/aa85c6
2. Profitability Report PDF Done https://github.com/magnetismtech/hr-lines/commit/0321d0
3. not sure what did I mess https://github.com/magnetismtech/hr-lines/commit/41ec8809f7a
4. Expense Schedule Summation Added https://github.com/magnetismtech/hr-lines/commit/40e
5. Expense Invoices Delete https://github.com/magnetismtech/hr-lines/commit/5ea108484267

Then you can use chatgpgt to format this. Or you can improve the script.

Todo
  • Format for gmail
  • Auto copy to clipboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment