Comments (7)
Would love this — my initial idea (not knowing about metadata) was to append a <!-- probot comment[<id>] -->
marker to the comment, then (on update) paginate comments until a comment with that marker (including id) was found
from ideas.
Either way I think @grrowl you can start creating the plugin, we will figure out how to get it into probot later :)
from ideas.
I’m not yet sure how you’d load the plugin in Probot though? @JasonEtco is robot.github set so it could be done in the Probot app’s entry point function?
That's a good point. We'd need to load the plugin in the handler itself I guess? We don't currently expose the GitHub client until its created in robot.auth
(as part of robot.on
). An interesting conversation though, as Octokit plugins become more mature we'll definitely want to help folks out in that area.
from ideas.
maybe probot/friction would be a better place to discuss this?
from ideas.
@grrowl sounds like a good plan to me :)
from ideas.
@grrowl that'd likely be the right implementation - I think the challenge is around designing a good looking API. I don't think it should be part of Probot, but would make a nice third-party lib (or even an Octokit plugin, what do you think @gr2m?)
Something like:
context.github.createOrUpdateComment({
owner, repo, issue,
body: '...', // First body, when comment is created
transform: oldComment => oldComment + 'New content', // Transform the original comment if it needs to update
marker: 'probot:APP_ID' // resolve to <!-- probot:APP_ID -->
})
from ideas.
sounds like a great plan to me :) @octokit/rest
plugins API is still work-in-progress but they already work. See https://github.com/octokit/rest.js/tree/master/lib/plugins for some info and reference plugin implementation. You could create a repository/npm package for the plugin and then load it like this
octokit.plugin(require('octokit-plugin-create-or-update-comment'))
I’m not yet sure how you’d load the plugin in Probot though? @JasonEtco is robot.github
set so it could be done in the Probot app’s entry point function?
rest.js - GitHub REST API client for Node.js
from ideas.
Related Issues (20)
- Resume Builder HOT 1
- Auto assign newly created issues to a specific person
- Add title to issue links? HOT 2
- بانک جهانی HOT 5
- Probot deployment using kubernetes/helm HOT 1
- Merge queue HOT 2
- Spotify integration?
- Keeping issues and PR in-sync with GitLab side HOT 1
- Don't dismiss stale reviews if the code diff doesn't change on rebase
- shakibae01
- ITResearch Introduce
- Creation of an automation app
- Not working on release name with wild character *
- asdasdasd HOT 1
- 1223123
- custum probot
- Creation of probot.github app failing with Error: The programmatic API was removed in npm v8.0.0
- agba-merger
- Create a bot to send Github inactivity reminders to email HOT 2
- module.exports HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ideas.