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

Scheduled Operations: Post a digest of unanswered StackExchange questions to Matrix #21

Closed
1 of 3 tasks
cmichi opened this issue Jun 8, 2022 · 5 comments
Closed
1 of 3 tasks
Assignees

Comments

@cmichi
Copy link

cmichi commented Jun 8, 2022

Describe your problem and idea for the tool

What you would like us to build? Which problem does it solve? What are the most important features this tool should have?

I would like to have a bot that posts unanswered Substrate StackExchange questions for specified tags to our core team channel in Matrix.

  • The questions should be posted as a digest to our core team channel.
  • Each question should contain the number of unanswered days as an info.
  • The digest should be posted every Monday 10 am CET.

This is the format I imagine:

Please just keep the number of days and don't shorten it to weeks. Please sort by longest unanswered on the top.

Those are the tags that should be watched: ink, smart-contract, pallet-contracts, substrate-contracts-node, cargo-contract, contracts.

The digest should be posted to https://matrix.to/#/!nqwrcufvSwqTNsLMkj:matrix.parity.io?via=matrix.parity.io&via=web3.foundation.

Talk to me (Matrix: @michi:matrix.parity.io) or @athei (Matrix: @alext:matrix.parity.io) if you need an admin to set up the bot in the channel.

How do you solve this problem now?

What workarounds have you already tried? Do you have any docs describing these processes? Have you tried any opensource tools or found articles that could theoretically help us with that?

There is no solution yet and asking people to go through unanswered questions by themselves hasn't been fruitful.

Importance and impact

  • Low. Would be nice to have it at some point in the future
  • Medium. Lack of this instrument really prevents some people from working effectively
  • High. If we don't make it by the deadline — we're doomed!

Deadline

Date, month or event reference to understand urgency.

31 June

Additional info

Any additional comments, links, inputs on what we need to know to understand your problem. You can mention other people here, so they can write their own inputs in comments. Remove this section if it's empty.

@mordamax mordamax transferred this issue from another repository Jun 10, 2022
@mordamax mordamax changed the title Tool needed: Post a digest of unanswered StackExchange questions to Matrix Scheduled Operations: Post a digest of unanswered StackExchange questions to Matrix Jun 10, 2022
@lovelaced
Copy link

Is there an RSS feed for this?

@mordamax mordamax self-assigned this Jun 24, 2022
@mordamax
Copy link
Collaborator

mordamax commented Jul 5, 2022

@lovelaced they have an API. I'm thinking we could use github workflow cron job (similar to https://github.com/paritytech/opstooling/blob/master/.github/workflows/good-morning-techops.yml, simple python script)

@cmichi few questions:

  1. How many questions (links) maximum should be posted per digest?

  2. stackexchange api requires to specify the exact site the questions will be loaded from. Default is stackoverflow - is it ok, or need to be other site?

  3. stackexchange has api for unanswered and no-answer-questions. Difference is that unanswered might have an answer, but it's there's no "accepted". Which type of "unanswered" you'd want to see in digest?

  4. Re. tags:

    From API description: To constrain questions returned to those with a set of tags, use the tagged parameter with a semi-colon delimited list of tags. This is an and constraint, passing tagged=c;java will return only those questions with both tags. As such, passing more than 5 tags will always return zero results.

    I suppose that we will need to load unanswered questions by each tag separately, because combining the tags might exclude many questions where only one of the tags presented. This leads to the first question - how many questions overall do we need to post, and how many of those do we need to pull from each tag separately.

@mordamax mordamax moved this to In Progress in Matrix Automation Jul 6, 2022
@cmichi
Copy link
Author

cmichi commented Jul 8, 2022

  1. Fifteen and if there are more there should be a sentence in italic indicating this after the list.
  2. Only for the site https://substrate.stackexchange.com/.
  3. no-answer-questions.
  4. Yes, you'll need to fetch them separately. Limiting to fifteen list items in total is fine.

@cmichi
Copy link
Author

cmichi commented Jul 8, 2022

Just thought of this:
While aggregating all no-answer questions from all tags you shouldn't stop when reaching the 15 questions limit. Instead you should aggregate all of them and then sort by "longest unanswered".

For the updated format I meant it like this:

Unfortunately there are more smart contract questions with no answers. The above list is limited to 15 entries. Please check StackExchange directly for the others.

@mordamax
Copy link
Collaborator

mordamax commented Jul 8, 2022

so basically it will be like:

  • load all ink questions, sort by date, limit 15
  • load all smart-contract, sort by date, limit 15
  • load all pallet-contracts, sort by date, limit 15
    etc ...
    -> then sum up all these results, sort again by date, limit 15,
    -> send to chat

@mordamax mordamax closed this as completed Jul 8, 2022
Repository owner moved this from In Progress to Done in Matrix Automation Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants