Comments (5)
@bkeepers and @hiimbex would really appreciate your insight into this. Thanks a lot.
from eslint-github-bot.
(Note: This issue wasn't originally intended to be a bug report to GitHub, but I'll add some more info since a few people have been pinged already. Let me know if I should report this somewhere else.)
Here's some more information about the particular events:
X-GitHub-Delivery: fafe2c30-bdf8-11e7-922b-a3c8d44a5819
is an example of a case where an issue-opened payload already contained the initial label on the issue. (This was followed by thefb061b70-bdf8-11e7-9188-71dde51a7192
delivery for adding the label.)X-GitHub-Delivery: 041a7a80-bdf9-11e7-8c3c-936b8cd0b1a1
is an example of a case where an issue-opened payload did not contain the initial label on the issue. (This was followed by the0422def0-bdf9-11e7-91ff-209baad94d9a
delivery for adding the label.)
In both cases, the issue was created with labels using the labels
option on node-github
, which I think maps directly to the labels
GitHub API option when creating the issue. Since the label is added at the same time as the issue is created, I would expect the initial issue-opened payload to always contain the label (or, at least, I would expect the behavior to be consistent).
from eslint-github-bot.
I have not had a chance to look into this issue in depth (I will try shortly); however, I am aware of several similar race conditions that occur within the GitHub API. So the solution may be just waiting until after the payload had been received and making a follow up API call to get the correct label data.
from eslint-github-bot.
Thanks for the response, that seems reasonable to me. Do you think making a separate API request would always avoid the issue? (My thinking is that if the issue is in an intermediate state without labels at the time that the webhook gets sent, it seems plausible that it would still be in the intermediate state when the next API call arrives. But I'm not sure whether that is actually a possibility.)
from eslint-github-bot.
I would imagine the additional API call would solve the problem, but not sure. Also the context.isBot
method might also be useful to ignore issues created by the bot itself.
from eslint-github-bot.
Related Issues (20)
- Bug: bot comments/adds auto closed label to already closed issues HOT 4
- Update: auto-closer warn before closing the issue HOT 3
- Feature: Support canary releases HOT 3
- Update release-monitor to use 4-week release cadence HOT 2
- Commit message check failing HOT 1
- Update: Helpful error messages for commit message format check HOT 13
- New label: fill issue template HOT 5
- Switch from master to main for primary branch HOT 1
- Updates for the new triage process
- shorten the text in the comment, to make less annoying HOT 6
- Test of the new bot HOT 1
- Auto-deploy failed HOT 1
- commit message checks missing HOT 3
- TSC Meeting issues not automatically created HOT 1
- Donβt add TSC meeting/release issues to triage board HOT 4
- Deploy doesn't work HOT 3
- Respecting the optional scope in Conventional Commits HOT 3
- Deploy failing HOT 1
- Bot still adds Triage labels to PRs HOT 3
- Bot needs updating to be deployed 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 eslint-github-bot.