Skip to content

Automated issue opening#21

Open
GabhenDM wants to merge 9 commits intoglobocom:masterfrom
GabhenDM:automated-issue-opening
Open

Automated issue opening#21
GabhenDM wants to merge 9 commits intoglobocom:masterfrom
GabhenDM:automated-issue-opening

Conversation

@GabhenDM
Copy link
Copy Markdown

@GabhenDM GabhenDM commented Oct 2, 2021

Implemented automatic issue opening for matched rules.

Adds a new Type/Collection "Issues" in order to track previously opened issues since all projects and triggered rules references are lost on collector execution.

Also added access methods for Name and Description on Ruler interface

Behavior as follows:

  • Checks if an issue already exists on DB (By project id and rule id (slug))
  • If no previous issue -> Create issue and persist to DB
  • If matched issue already exists, check on gitlab if still open, in case it isn't, open a new issue with "Reopened" tag (Not sure if good idea)

Possible shortcomings:
Fixed issues are never deleted on DB, since there is no reference on each collector execution, open to ideas on how to improve this 😅

Closes #6

Happy hacktoberfest! 👻 🤘🏻

@tcarreira
Copy link
Copy Markdown
Contributor

tcarreira commented Oct 5, 2021

Behavior as follows:

  • If matched issue already exists, check on gitlab if still open, in case it isn't, open a new issue with "Reopened" tag (Not sure if good idea)

I wouldn't apply this last one. Since "we are all grown up", if the first issue was closed, I'm going to suppose there is a reason for that.

The issue will persist on the gitlab-lint side, so, no hard feelings :)

@GabhenDM
Copy link
Copy Markdown
Author

GabhenDM commented Oct 7, 2021

Behavior as follows:

  • If matched issue already exists, check on gitlab if still open, in case it isn't, open a new issue with "Reopened" tag (Not sure if good idea)

I wouldn't apply this last one. Since "we are all grown up", if the first issue was closed, I'm going to suppose there is a reason for that.

The issue will persist on the gitlab-ci side, so, no hard feelings :)

I agree that it makes sense! Any thoughts @marcelometal ?

PS: Also fixed a couple of bugs that I didn't notice :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically open an issue or MR for each gitlab repository that trigger some rule

3 participants