Git Product home page Git Product logo

logseq-github's Introduction

Logseq Github Plugin

Automatically synchronize the github workflow with logseq.

screenshot

Settings

An example of the settings is like below:

{
  "disabled": false,
  "github_access_token": "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",
  "sync_period": "5m"
}

The github_access_token is the token to access github API. You can get it in https://github.com/settings/tokens.

sync_period is the period of synchronization.

For every block with repo and query attributions, the plugin will send the query to github API and insert the issue/pr into this block (as children). For example

## Pull Request Request for Review

repo:: chaos-mesh/chaos-mesh
query:: is:pr is:open user-review-requested:@me

After enabling the plugin, all pull requests waiting for your review will be inserted into the block.

Attributions

repo represents the target repo.

query specifies the search query for github. You can read more about the syntax in Understanding the search syntax

recent_day means to get issues/prs whose updated time is later than "recent_day" days ago.

Suggestion

Every inserted block will be equipped with an attribution: issue-number, so you may want to hide the attribution from displaying everywhere. Adding following configuration to your config.edn will do the trick:

:block-hidden-properties #{:issue-number}

TODO

  1. Support more deletion strategy. Don't remove the block (even if they disappear in the query) in some cases.
  2. Support richer template mechanism (and remove the Github Last Week Pull Request slash command, which is hard to use and understand).

logseq-github's People

Contributors

yangkeao avatar strrl avatar

Stargazers

York Wong avatar  avatar xixi avatar Ben Ye avatar

Watchers

James Cloos avatar  avatar

Forkers

strrl

logseq-github's Issues

Get undefined when reading block id

Thanks for this brilliant plugin😍

I'm not sure if this is my env problem. The blockUuid will be undefined when updating. Here's a patch works for me:

diff --git a/src/index.ts b/src/index.ts
index 2a269e9..0f782ac 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -188,7 +188,7 @@ async function main() {
 
     targetBlocks.forEach(async (block: any) => {
       // TODO: get uuid in a better way
-      const blockUuid = block.uuid.$uuid$;
+      const blockUuid = block.uuid;
       const repo = block.properties.repo;
       let query = block.properties.query;
       const recentDay = block.properties["recent-day"] || 0;

Willing to submit a PR if it's useful 🤗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.