34 Commits

Author SHA1 Message Date
siraj.yasin
272078ce19 Disable issue reopen on gerrit activity
* Few issues identified in BOT in reopening the issue on gerrit activity
  => When an old PS (tagged with issue number) is abandoned, BOT reopens
     the issue considering some activity on the issue in gerrit.
  => When a PS is merged and closed by BOT, in the next run if it identifies some
     event due to Post/Promote Job, then the issue is immediately re-opened.

Relates-To: #502
Change-Id: Id8516fb10c812873f1b4e4c3f2794845e29824d6
2021-04-19 17:31:38 +00:00
siraj.yasin
d72c3e435e Separate the labeling and commenting logic
* Trying to integrate the latest changes for labels from here
  https://github.com/ianpittwood/Gerrit-to-Github-Issues/pull/11/commits

Change-Id: I7759c01ba1447ba33708ae510e7af010606d6ced
2021-03-05 14:58:53 +00:00
siraj.yasin
8efbca796e Skip assigned issues even if "/assign" requested
* When a user requests for an issue by leaving comment
  "/assign", BOT tries to assign that issue to the requested user
  irrespective of its current state. However it should skip if
  the issue is already assigned.

Change-Id: Ib3d81e0556cf6b25c8b433650c1b9c3313f2631a
2021-02-26 15:43:09 +00:00
siraj.yasin
7abd3b56cd Disable Issue assignment by age of the issue.
* BOT has a logic to pick all old issues > 30 days and
  try to assign it to other user if it is not closed yet.
  But it assigns to same user on every run. While this issue is
  investigated and getting resolved, this feature is temporarily
  disabled.

Change-Id: I50ea2af35320ef1decbf84ae8760d5508e31f793
2021-02-23 15:12:37 +00:00
siraj.yasin
51135cfb59 Fix issues with latest BOT code
* typecasting error fixed. ps_number should be treated as string
* Attribute issue. issue do not have name attribute, used title instead
* sequence item 0: expected str instance, NamedUser found

Relates-To: #237
Change-Id: Iea7310c0ac15980b3022801ba5ae9cd4a858904b
2021-02-18 19:33:35 +00:00
siraj.yasin
6f957c39b0 Add CI for gerrit-to-github-bot
* Adding CI to enable github mirroring
* Adding noop job for now. will add real jobs once
  we have some tox config and unit tests defined

Change-Id: Id49240b1d8938e8b6cee8fa29228243781677008
2021-02-11 21:49:22 +00:00
Alexander Hughes
171b11a5f6
Merge pull request #3 from ian-howell/project-board-management
Integrate with the github project board
2020-07-29 08:02:39 -04:00
Alexander Hughes
7e34880865
Merge pull request #8 from ian-howell/assignme
Add issue assignment management
2020-07-29 08:01:40 -04:00
Ian Howell
86d5f999df Fix up various bugs
* Added a missing colon
* Added a missing return statement
* Initialized some variables
* Fixed a variable-naming issue
* Various style changes
2020-07-27 09:06:17 -05:00
Ian Howell
48e9bcfdf8 Fixup bugs for issue assignment
* Added missing colon
* Added missing `datetime` import
* Fixed a misspelling
2020-07-22 10:36:14 -05:00
Ian Howell
0bf325ccbd Reduce "time until stale" from 2 months to 1 2020-07-22 10:36:05 -05:00
Ian Howell
24546b0ec2 Do substring check for /assign
This makes it so that if a user adds an extra space, or uses a more
involved message such as "Hi please /assign this to me", the bot will
still assign the user
2020-05-14 15:25:24 -05:00
Ian Howell
35f4a5221a Add issue assignment management
This commit allows the bot to assign issues to users using the `/assign`
command.
2020-05-07 14:45:31 -05:00
Ian Howell
100ca8d1c0 Fix f-strings in move_issue 2020-05-04 08:22:59 -05:00
Ian Howell
35ddc454c9 Add annotations to move_issue 2020-05-04 08:22:41 -05:00
Ian Howell
727e8eb44d Integrate with the github project board
Implement a feature allowing the bot to move issues around on the
project board:
* When a change's commit message includes "WIP" or "DNM",
  the issue will be moved to the "In Progress" column.
* When a change's commit message does *not* include "WIP" or "DNM",
  assume that the change is ready for review, and move it to the
  "Submitted on Gerrit" column.
2020-04-30 14:24:26 -05:00
Ian Howell
09fa974779
Uplift PyGithub (#2) 2020-04-30 09:52:28 -05:00
Ian H Pittwood
268be3f5a2 Add pytz as a requirement 2020-03-16 16:23:38 -05:00
Ian H Pittwood
9a2a9313a5 Bump version to 0.0.4 2020-03-16 16:21:56 -05:00
Ian Pittwood
5b055bba76
Implements evaluation and posting of change approvals on issues (#1)
* Add logic to get the comment by the script bot for a specific change

* Implement comment editing logic

* Update formatting for new messages
2020-03-16 16:18:39 -05:00
Ian H Pittwood
5919e03842 Add parameter to set a limit on the age of changes looked back at 2020-02-27 17:50:58 -06:00
Ian H Pittwood
32d3914cdd Release 0.0.3 2020-02-27 15:18:18 -06:00
Ian H Pittwood
e20a7cc276 Fix deleted logging configuration call 2020-02-27 15:11:23 -06:00
Ian H Pittwood
fe4b77381a Adds --log-file option to specify a file to log to
Makes default log stream sys.stdout
2020-02-27 15:05:38 -06:00
Ian H Pittwood
6dc63ff32b Add logic to remove issue numbers from 'related' that are duplicated in 'closed' 2020-02-27 14:33:28 -06:00
Ian H Pittwood
14fe4f88ed Release 0.0.2 2020-02-27 14:18:31 -06:00
Ian H Pittwood
8d0c6ad60b Fix closes message to only be printed on new related changes 2020-02-27 14:16:44 -06:00
Ian H Pittwood
166a892408 Finalize changes for 0.0.1 build 2020-02-27 11:24:49 -06:00
Ian H Pittwood
21c88fef51 Prepare project for packaging
Adds setuptools configuration and CLI entry point

Fixes labels list retrieval to use strings
2020-02-27 11:01:02 -06:00
Ian H Pittwood
cf6e9a94c1 Implement Relates-To and Closes tagging 2020-02-27 10:26:15 -06:00
Ian H Pittwood
300ab3ee0d Test and debug interactions 2020-02-26 16:05:30 -06:00
Ian H Pittwood
01403d9a85 Implement Gerrit change retrieval and processing 2020-02-26 14:55:57 -06:00
Ian H Pittwood
d9eed87822 Add initial script implemented in a Zuul playbook 2020-02-26 12:06:16 -06:00
Ian Pittwood
b94d5cd806
Initial commit 2020-02-26 12:00:02 -06:00