Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature in same plugin we did code in house and want to share #5

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Quardah
Copy link
Contributor

@Quardah Quardah commented Jan 20, 2022

Hi BoTreeConsultingTeam i hope you are doing well.

Starting from your work we developed a new feature to add in this plugin. Maybe some other user will see this plugin and eventually want to use the feature.

It's pretty bare-bone, but this feature allows for tickets to be automatically updated when receiving a PR webhook from github.

You can setup the same webhook as you did but change the payload URL to "github_change_notification" instead of "create_comment". It uses the same github_secret_token, so on github paste the same token. It also uses the same - #rmXXX scheme you are using for commits message, but it must be included in the PR title.

To use the feature now, setup the following two environment variables :

CURRENT_REDMINE_STATE
NEXT_REDMINE_STATE

Before starting Redmine (the same as setting up the Github Token variable). To get the status numbers, in redmine administration, hover over the status and the link target will contain the status number ID.

If none are set, the default CURRENT will be 2 (In Progress) and the default NEXT will be 3 (In Review).

This work has been done during my employment at FJNR (Web site - Github) with the participation of Noel Rignon regarding the research and analysis of your plugin, with the goal of having automations on our internal task management processes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Quardah ,

Thanks for taking time to submit this PR, really appreciate! The code looks good, and a nice idea to update the ticket state automatically! 👍

I have just one suggestion so that we can keep current and next status code as configurable, without requiring any code changes!

Thanks,
Parth

@Quardah
Copy link
Contributor Author

Quardah commented Jan 20, 2022

Hi. I just did the push.

Thank you for your time.
JPBD

… missing env var (no default), updated readme
@Quardah
Copy link
Contributor Author

Quardah commented Jan 28, 2022

Hi, me again, i have updated the code again.

1 - fixed lables order (no_pr_found and no_update were inverted in the code)
2 - graceful failure if no env var are set
3 - better env var checking, less prone to errors
4 - better error messages in case of failures
5 - updated readme to setup plugin

Thank you for your feedback i hope you appreciate this contribution.

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.

3 participants