Comments (11)
I was thinking about this, and thinking we could read all comments from our bot and delete them via the API, but if they have replies, that would mess things up.
from discord.
I do believe that we can access just the most recent commit, but since PR comments occur on the merge commit that may confuse things. Any reason we shouldn't re-comment on issues in the PR?
from discord.
My issue is that let's say a PR goes back and forth a dozen times...do we want a dozen comments for the same change for each update/commit? It's too much noise, IMO. We should at least dig for a better solution.
from discord.
We could just ignore files that haven't changed in the last commit. Those that have will loose the original; comments, so we will need to re-comment if they haven't been fixed.
from discord.
Lines that change will lose their comments, but only those lines. So re-commenting on files that have changed won't be enough.
from discord.
The latest commit should only have lines that have changed. Perhaps we use only the latest commit to determine which lines have changes, and build comments from that? Since we would still have merge commit numbers, it should only be one additional call to github to fetch the latest commit diff.
from discord.
We'll also need to handle the case where someone rewrites the history of a branch.
I wonder if we might be over-thinking it. Would something as simple as not adding a comment if one already exists work?
from discord.
What if someone else made a comment on the line? I agree that it seems like there should be a simpler answer, but i'd bet that we could release a fix with what we have now.
As for branch rewrites? I believe Github will clear all comments when that happens, so we use the latest commit, which should have all the changes again. This is one of the reasons I feel that rewriting history should be saved for the actual PR merge, or not executed at all, but it's definitely a problem we need to solve.
from discord.
If #89 gets completed, we can use the db to track comments easily.
from discord.
This can be triggered by a few things, including but not limited to rebasing a commit, adding a new commit to the same branch, and closing/reopening a pull request.
from discord.
Quoting @groovecoder from #151:
@openjck and I thought a solution may be:
- Create a
comments
table in our shiny new postgres database- Update the comment code to store a hash of the url, file name, line number, and line contents
- Before making a comment, make sure there isn't already a comment record with the same hash
That file name, line number, and line contents combination seems to be the same keys that GitHub uses to decide whether to collapse comments in the PR interface. But we can tweak the hash components as needed.
from discord.
Related Issues (20)
- Measure number of initial installations HOT 8
- Measure number of active installs HOT 1
- Start using a new, Mozilla-approved brand
- Discord does not comment on all incompatibilities HOT 8
- Update CONTRIBUTING.md to mention adding a worker (and the charges that will result) HOT 4
- Closing and re-opening a pull request causes double/triple commenting. HOT 4
- TESTING.MD not accessible via website HOT 4
- We seem to keep redis connections open? HOT 4
- Discord sometimes comments on old, inactive pull requests
- Change processor to call a doiuse.com server (micro-service) HOT 5
- 1-line changes/files break comments
- move test cleanup to a "tearDown" method?
- Update README for current project status.
- UI crash HOT 4
- React to rate-limit being reached HOT 9
- Measure number of issues corrected by code authors in response to a Discord comment HOT 6
- Write a blog post promoting Discord
- Permanently record how many comments Discord has made HOT 8
- Permanently record which repositories use Discord HOT 1
- Track views to the Discord homepage HOT 6
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 discord.