Giter Club home page Giter Club logo

reminders's Introduction

Probot's logo, a cartoon robot

A framework for building GitHub Apps to automate and improve your workflow

npm Build Status Codecov @ProbotTheRobot on Twitter


If you've ever thought, "wouldn't it be cool if GitHub could…"; I'm going to stop you right there. Most features can actually be added via GitHub Apps, which extend GitHub and can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. Apps are first class actors within GitHub.

How it works

Probot is a framework for building GitHub Apps in Node.js, written in TypeScript. GitHub Apps can listen to webhook events sent by a repository or organization. Probot uses its internal event emitter to perform actions based on those events. A simple Probot App might look like this:

export default (app) => {
  app.on("issues.opened", async (context) => {
    const issueComment = context.issue({
      body: "Thanks for opening this issue!",
    });
    return context.octokit.issues.createComment(issueComment);
  });

  app.onAny(async (context) => {
    context.log.info({ event: context.name, action: context.payload.action });
  });

  app.onError(async (error) => {
    app.log.error(error);
  });
};

Building a Probot App

If you've landed in this GitHub repository and are looking to start building your own Probot App, look no further than probot.github.io! The Probot website contains our extensive getting started documentation and will guide you through the set up process.

This repository hosts the code for the npm Probot package which is what all Probot Apps run on. Most folks who land in this repository are likely looking to get started building their own app.

Contributing

Probot is built by people just like you! Most of the interesting things are built with Probot, so consider starting by writing a new app or improving one of the existing ones.

If you're interested in contributing to Probot itself, check out our contributing docs to get started.

Want to discuss with Probot users and contributors? Discuss on GitHub!

Ideas

Have an idea for a cool new GitHub App (built with Probot)? That's great! If you want feedback, help, or just to share it with the world you can do so by creating an issue in the probot/ideas repository!

reminders's People

Contributors

bkeepers avatar chris48s avatar gr2m avatar grantbirki avatar greenkeeper[bot] avatar hiimbex avatar itaditya avatar jakewilkins avatar jbjonesjr avatar knrt10 avatar renovate[bot] avatar simonbynd avatar yamishi13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

reminders's Issues

label management thoughts

const labels = context.payload.issue.labels;
if (!labels.find(label => label.name === config.reminders.label)) {
labels.push(config.reminders.label);
}
await context.github.issues.edit(context.issue({labels}));

First, slight optimization:

You should be able to only perform the issue.edit if the labels have changed, aka, something like:

(labels.length != issue.labels.length) await context.github.issues.edit(context.issue({labels}));
(or whatever the proper modern javascript syntax is for that)

Next, since adding a label to an issue requires you to determine if it already exists for the issue, use iterators/find, conditionals, and then and updating the issue if necessary, it would be awesome if this could be abstracted from the user. Whether a little node-github helper library or node-github itself, providing some abstracted, optimized methods for tasks like this would help all. Of course, it would be great if the GitHub API supported this, but we could provide some JS help in the meantime. Thoughts?

Use object destructuring in reminders.js

At certain places like line 28 in reminders.js we haven't used Object destructuring but at other places we do that. This definitely makes the code inconsistent. I would like to make a PR to fix this.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Reminder timing off significantly

Hi! I set a reminder recently and it seemed to run quite a bit later than expected.

I understand that "tomorrow" was parsed in the context of UTC, but the stated date for the reminder and the actual date of the reminder comment were a couple of days different.

screen shot 2018-12-10 at 7 10 58 pm

Plain simple: does not work....

... installed the app.
Gave it access to all my repos.
Typing / pulls up all possible commands, not any remind.
Typing and commenting with /remind does nothing. Just adds a comment to an issue.

Is this still something supposed to work, or abandoned? If abandoned/ not working it would be very nice to get it archived so users do stop using it.

Pull requests not supported

Related to #16

It seems pull-requests are not supported, any pointers on how to add them?

I might take a stab at sending in a PR :)

An in-range update of chrono-node is breaking the build 🚨

The dependency chrono-node was updated from 1.3.11 to 1.4.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

chrono-node is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 27 commits.

  • c21fae0 fix: leak global name space reported in #302
  • 7ab8505 Merge branch 'gecko655-work/fix-ja-era-1-digit'
  • 9a09f5b fix: conflict with master in JPStandardParser.js
  • 237a85c fix: JPStandardParser.js year checking
  • e342a2f Merge branch 'gecko655-fix-leapyear'
  • ca12dfc Merge pull request #313 from wanasit/moment-to-dayjs
  • 971a30d Degrade js syntax and build
  • 152fc16 Replace moment with dayjs
  • a1cef11 Fixed leap year issue for JPParser
  • 0c0a701 Add test for jp parser leap year bug
  • fed7bb1 JP parser: Capture era year with 1 digit like '令和2年'
  • 25b8322 Added test for '令和2年'
  • a292f3c Merge pull request #289 from blowery/patch-1
  • 1db1df7 Merge pull request #298 from gecko655/jp-kotoshi-honnen
  • b280d63 Build all

There are 27 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

How about reminders for other users

Hi there,

we really like this feature for probot! 👍
One feature that would make it even more handy is reminders for other users than me.

Is there any particular reason why it's only working for the user triggering the reminder?
If not, I'd be happy to work on a PR. I've also found https://github.com/bkeepers/parse-reminder which would need an update too.

Missleading Readme

Update the README.md file to say /remind instead of /reminders, as it is shown in the screenshot

Guess the timezone of the user setting a reminder

Setting reminders for specific times is challenging because we don't know the timezone of the user. So if I say /remind me on monday at 9am, this app currently assumes you mean 9am UTC, which is probably not what you meant.

@jbjonesjr brought up the desire for timezone data at office hours today and we had a bit of an epiphany: Git stores the users time offset, so if we can fetch a recent commit from a user, we could infer their timezone offset:

$ curl -H 'Accept: application/vnd.github.patch' https://api.github.com/repos/probot/probot/commits/5dde8405c5772ce1794c8216b4b6f24860e3d568 | head -n 3
From 5dde8405c5772ce1794c8216b4b6f24860e3d568 Mon Sep 17 00:00:00 2001
From: Brandon Keepers <[email protected]>
Date: Thu, 2 Nov 2017 20:39:12 -0500

We could use search to get the latest commit for a user:

$ curl -H 'Accept: application/vnd.github.cloak-preview' \
  https://api.github.com/search/commits\?q\=author:bkeepers\&per_page\=1\&sort\=committer-date\&order\=desc 

And then fetch the raw patch above to get the time offset.

An in-range update of eslint-plugin-import is breaking the build 🚨

The devDependency eslint-plugin-import was updated from 2.17.2 to 2.17.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-import is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 25 commits.

  • cf5573b Bump to v2.17.3
  • caae65c [Tests] eslint 2 does not have linter.version
  • 557a3e2 [Deps] update resolve
  • 17beb33 Merge pull request #1356 from christophercurrie/typescript-declare
  • c8ac7ff [Docs] Document env option for eslint-import-resolver-webpack
  • c09c0ce Issue #1258 (docs)
  • 753c9db [refactor] fix eslint 6 compat by fixing imports
  • b52bf3e PR feedback
  • 7aa13d1 PR feedback
  • f66e064 Remove log messages
  • d1e4455 Verbose variable names
  • 67b1e95 Support older typescript parsers
  • 288cedf Make groups non-capturing.
  • aa290bb Improve support for Typescript declare structures
  • 1edbbd0 [Fix] no-common-js: Also throw an error when assigning

There are 25 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

App is broken?

It looks like the heroku app that this bot used is no longer in service.
Can someone create a new one?

Handle failure to parse reminder

There's currently a conditional that checks if the reminder parsing returns a result, and stores the reminder if it does. We should also add an else that posts a comment to warn the user, and reports the issue to sentry with robot.log.error so we can track syntax of commands that fail to parse.

if (reminder) {

An in-range update of probot-metadata is breaking the build 🚨

The dependency probot-metadata was updated from 1.0.0 to 1.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

probot-metadata is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 16 commits.

  • 226d5bc 1.0.1
  • a2d3b83 Merge pull request #17 from BinaryMuse/mkt/watch-that-null
  • e62bcb5 Add tests
  • 1b820b6 Use default value in both get and set
  • 97747f3 fix: Protect against PRs with null bodies
  • ce16dda fix: issues.edit → issues.update (#15)
  • aecac08 Merge pull request #14 from macklinu/update-jest
  • fad101d Update Jest to v23.6.0
  • cd33665 Rename config.yml to stale.yml
  • faaf387 Create config.yml
  • 913267c Merge pull request #6 from probot/jest
  • d8c9333 Merge remote-tracking branch 'origin/jest' into jest
  • 1592321 Migrate to jest
  • f281dbc Migrate to Jest
  • 8610f8c Merge pull request #5 from dnldsht/ignore-package-lock

There are 16 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Reminder config error?

The last time the reminder bot worked in one of my repositories was 26 days ago. Did something change or am I doing something wrong?

An in-range update of eslint-plugin-import is breaking the build 🚨

The devDependency eslint-plugin-import was updated from 2.18.2 to 2.19.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-import is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 46 commits.

  • 9b76635 Bump to v2.19.0
  • 47a232e [resolvers/webpack] v0.12.0
  • 26ad476 [resolvers/webpack] [deps] update debug, enhanced-resolve, has, interpret, lodash, resolve, semver
  • 3f0e8f3 [resolvers/node] [Deps] update resolve
  • 7190c3e bump utils to v2.5.0
  • a60e5c6 [New] no-commonjs: add allowConditionalRequire option
  • 414c923 [New] enable passing cwd as an option to eslint-import-resolver-webpack
  • 8224e51 [New] order/no-extraneous-dependencies: Alphabetize imports within groups
  • f12ae59 [New] no-duplicates: add a considerQueryString option to handle false positives when using some webpack loaders.
  • 2d3d045 [fix] importType: Accept '@example' as internal
  • 0426f16 [New] order: add pathGroups option to add support to order by paths
  • 99b3fbf [Fix] no-extraneous-dependencies: Add support for export from
  • 21bf8c6 [Fix] no-cycle: should not warn for Flow imports
  • 0cd5e43 [Fix] no-unused-modules: fix crash due to export *
  • 05085bb [flow] no-unused-modules: add flow type support

There are 46 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

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.