Skip to content

Added support for notification with server version greater than 9#127

Merged
wiggin77 merged 17 commits intooauth_setupfrom
notification_setup
Mar 10, 2025
Merged

Added support for notification with server version greater than 9#127
wiggin77 merged 17 commits intooauth_setupfrom
notification_setup

Conversation

@Kshitij-Katiyar
Copy link
Copy Markdown
Contributor

@Kshitij-Katiyar Kshitij-Katiyar commented Feb 4, 2025

Summary

  • Added support for notification with server version greater than 9
  • Use OAuth authentication to get extra data to send notifications

Screenshots

Screenshot from 2025-02-04 18-37-09

@Kshitij-Katiyar Kshitij-Katiyar added the 2: Dev Review Requires review by a core committer label Feb 4, 2025
@Kshitij-Katiyar Kshitij-Katiyar self-assigned this Feb 4, 2025
@Kshitij-Katiyar
Copy link
Copy Markdown
Contributor Author

@wiggin77 Fixed the comments

var previousStartToken html.Token

for {
tt := domDoc.Next()
Copy link
Copy Markdown
Member

@wiggin77 wiggin77 Feb 5, 2025

Choose a reason for hiding this comment

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

Since the only way out of this loop is when a html.ErrorToken is received, are we guaranteed to get this error at some point? There is no EOF token?

Copy link
Copy Markdown
Contributor Author

@Kshitij-Katiyar Kshitij-Katiyar Feb 7, 2025

Choose a reason for hiding this comment

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

Yes, html.ErrorToken is guaranteed.
html.ErrorToken is used to indicate an EOF

Copy link
Copy Markdown
Member

@wiggin77 wiggin77 left a comment

Choose a reason for hiding this comment

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

LGTM 👍 One minor edit and a question.

@fmartingr fmartingr self-requested a review March 10, 2025 09:24
@Kshitij-Katiyar
Copy link
Copy Markdown
Contributor Author

@fmartingr Please re-review, i have fixed the comments

@wiggin77 wiggin77 merged commit c43c30a into oauth_setup Mar 10, 2025
3 checks passed
@wiggin77 wiggin77 deleted the notification_setup branch March 10, 2025 16:02
@fmartingr
Copy link
Copy Markdown
Contributor

@wiggin77 You merged this branch but #128 and #129 depend on this one. We should merge from the oldest to the newest to generate the feature branch.

Kshitij-Katiyar added a commit that referenced this pull request Mar 13, 2025
* refactored the code and added flow manager

* removed unused code

* fixed lint

* added oauth setup and connect disconnect command

* removed unrelated changes from package lock

* fixed lint

* fixed missing go mod entry

* removed unwanted code and added mutliple status code handling

* fixed lint

* fixed step title

* removed unwanted variables

* removed extra lines in flow instructions

* updated flow messages

* review fixes

* fixed callJSONwithURL call

* review fixes

* fixed lint

* fixed lint

* Added support for notification with server version greater than 9 (#127)

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* refactored code and added constants

* fixed lint

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* review fixes

* review fixes

* removed unused code

* fixed go mod enteries

* removed external css sheet

* review fixes
Kshitij-Katiyar added a commit that referenced this pull request Mar 13, 2025
* refactored the code and added flow manager

* removed unused code

* fixed lint

* added oauth setup and connect disconnect command

* removed unrelated changes from package lock

* fixed lint

* fixed missing go mod entry

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* removed unwanted code and added mutliple status code handling

* fixed lint

* fixed step title

* removed unwanted variables

* refactored code and added constants

* fixed lint

* added support for generic notification when user not connected

* fixed lint

* removed extra lines in flow instructions

* updated flow messages

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* add more log information

* fixed log info

* review fixes

* review fixes

* review fixes

* fixed callJSONwithURL call

* review fixes

* fixed lint

* fixed lint

* fixed lint

* Added support for notification with server version greater than 9 (#127)

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* refactored code and added constants

* fixed lint

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* fixed missing var

* review fixes

* review fixes

* review fixes

* removed unused code

* fixed go mod enteries

* removed external css sheet

* review fixes
Kshitij-Katiyar added a commit that referenced this pull request Mar 13, 2025
* refactored the code and added flow manager

* removed unused code

* fixed lint

* added oauth setup and connect disconnect command

* removed unrelated changes from package lock

* fixed lint

* fixed missing go mod entry

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* removed unwanted code and added mutliple status code handling

* fixed lint

* fixed step title

* removed unwanted variables

* refactored code and added constants

* fixed lint

* added support for generic notification when user not connected

* fixed lint

* added support for admin api token

* removed unused code

* fixed lint

* fixed import issues

* removed extra lines in flow instructions

* saved server version in plugin config

* updated flow messages

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* add more log information

* fixed log info

* removed unwanted code and improved logs

* fixed type in config descriptions

* updated config descriptions

* review fixes

* review fixes

* review fixes

* fixed callJSONwithURL call

* review fixes

* fixed lint

* fixed lint

* fixed lint

* removed unused variables

* Added support for notification with server version greater than 9 (#127)

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* refactored code and added constants

* fixed lint

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* review fixes

* fixed missing var

* added comment to notification logic

* review fixes

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* fixed go mod enteries

* replaced marshalling with byte conversion

* removed external css sheet

* review fixes

* Update server/confluence_cloud.go log info

Co-authored-by: Raghav Aggarwal <raghav.aggarwal@brightscout.com>

* removed unused vars

---------

Co-authored-by: Raghav Aggarwal <raghav.aggarwal@brightscout.com>
Kshitij-Katiyar added a commit that referenced this pull request Mar 13, 2025
* refactored the code and added flow manager

* removed unused code

* fixed lint

* added oauth setup and connect disconnect command

* removed unrelated changes from package lock

* fixed lint

* fixed missing go mod entry

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* removed unwanted code and added mutliple status code handling

* fixed lint

* fixed step title

* removed unwanted variables

* refactored code and added constants

* fixed lint

* added support for generic notification when user not connected

* fixed lint

* added support for admin api token

* removed unused code

* fixed lint

* fixed import issues

* removed extra lines in flow instructions

* saved server version in plugin config

* updated flow messages

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* add more log information

* fixed log info

* removed unwanted code and improved logs

* fixed type in config descriptions

* updated config descriptions

* review fixes

* review fixes

* review fixes

* fixed callJSONwithURL call

* review fixes

* fixed lint

* fixed lint

* fixed lint

* removed unused variables

* Added support for notification with server version greater than 9 (#127)

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* refactored code and added constants

* fixed lint

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* review fixes

* fixed missing var

* added comment to notification logic

* review fixes

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* fixed go mod enteries

* replaced marshalling with byte conversion

* removed external css sheet

* review fixes

* Update server/confluence_cloud.go log info

Co-authored-by: Raghav Aggarwal <raghav.aggarwal@brightscout.com>

* removed encryption for admin api token

* improved help text for encryption key

* removed unused var in plugin struct

---------

Co-authored-by: Raghav Aggarwal <raghav.aggarwal@brightscout.com>
Kshitij-Katiyar added a commit that referenced this pull request Mar 20, 2025
… than 9 (#134)

* Refactored the code and added flow manager for Oauth setup (#125)

* refactored the code and added flow manager

* removed unused code

* fixed lint

* removed unwanted code and added mutliple status code handling

* fixed lint

* fixed step title

* removed extra lines in flow instructions

* review fixes

* fixed lint

* review fixes

* removed unused code

* fixed go mod enteries

* Added Oauth setup and connect disconnect command (#126)

* refactored the code and added flow manager

* removed unused code

* fixed lint

* added oauth setup and connect disconnect command

* removed unrelated changes from package lock

* fixed lint

* fixed missing go mod entry

* removed unwanted code and added mutliple status code handling

* fixed lint

* fixed step title

* removed unwanted variables

* removed extra lines in flow instructions

* updated flow messages

* review fixes

* fixed callJSONwithURL call

* review fixes

* fixed lint

* fixed lint

* Added support for notification with server version greater than 9 (#127)

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* refactored code and added constants

* fixed lint

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* review fixes

* review fixes

* removed unused code

* fixed go mod enteries

* removed external css sheet

* review fixes

* Added support for generic notification when user is not connected (#128)

* refactored the code and added flow manager

* removed unused code

* fixed lint

* added oauth setup and connect disconnect command

* removed unrelated changes from package lock

* fixed lint

* fixed missing go mod entry

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* removed unwanted code and added mutliple status code handling

* fixed lint

* fixed step title

* removed unwanted variables

* refactored code and added constants

* fixed lint

* added support for generic notification when user not connected

* fixed lint

* removed extra lines in flow instructions

* updated flow messages

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* add more log information

* fixed log info

* review fixes

* review fixes

* review fixes

* fixed callJSONwithURL call

* review fixes

* fixed lint

* fixed lint

* fixed lint

* Added support for notification with server version greater than 9 (#127)

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* refactored code and added constants

* fixed lint

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* fixed missing var

* review fixes

* review fixes

* review fixes

* removed unused code

* fixed go mod enteries

* removed external css sheet

* review fixes

* Added support for using admin API token for webhook notifications (#129)

* refactored the code and added flow manager

* removed unused code

* fixed lint

* added oauth setup and connect disconnect command

* removed unrelated changes from package lock

* fixed lint

* fixed missing go mod entry

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* removed unwanted code and added mutliple status code handling

* fixed lint

* fixed step title

* removed unwanted variables

* refactored code and added constants

* fixed lint

* added support for generic notification when user not connected

* fixed lint

* added support for admin api token

* removed unused code

* fixed lint

* fixed import issues

* removed extra lines in flow instructions

* saved server version in plugin config

* updated flow messages

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* add more log information

* fixed log info

* removed unwanted code and improved logs

* fixed type in config descriptions

* updated config descriptions

* review fixes

* review fixes

* review fixes

* fixed callJSONwithURL call

* review fixes

* fixed lint

* fixed lint

* fixed lint

* removed unused variables

* Added support for notification with server version greater than 9 (#127)

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* refactored code and added constants

* fixed lint

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* review fixes

* fixed missing var

* added comment to notification logic

* review fixes

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* fixed go mod enteries

* replaced marshalling with byte conversion

* removed external css sheet

* review fixes

* Update server/confluence_cloud.go log info

Co-authored-by: Raghav Aggarwal <raghav.aggarwal@brightscout.com>

* removed unused vars

---------

Co-authored-by: Raghav Aggarwal <raghav.aggarwal@brightscout.com>

* Removed encryption for admin API token (#133)

* refactored the code and added flow manager

* removed unused code

* fixed lint

* added oauth setup and connect disconnect command

* removed unrelated changes from package lock

* fixed lint

* fixed missing go mod entry

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* removed unwanted code and added mutliple status code handling

* fixed lint

* fixed step title

* removed unwanted variables

* refactored code and added constants

* fixed lint

* added support for generic notification when user not connected

* fixed lint

* added support for admin api token

* removed unused code

* fixed lint

* fixed import issues

* removed extra lines in flow instructions

* saved server version in plugin config

* updated flow messages

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* add more log information

* fixed log info

* removed unwanted code and improved logs

* fixed type in config descriptions

* updated config descriptions

* review fixes

* review fixes

* review fixes

* fixed callJSONwithURL call

* review fixes

* fixed lint

* fixed lint

* fixed lint

* removed unused variables

* Added support for notification with server version greater than 9 (#127)

* Added support for notification with server version > 9

* fixed disconnect error

* fixed lint issues

* refactored code and added constants

* fixed lint

* review fixes and removed unused codes

* fixed lint

* moved types out of functions

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* review fixes

* fixed missing var

* added comment to notification logic

* review fixes

* review fixes

* review fixes

* fixed lint

* review fixes

* removed unused code

* fixed go mod enteries

* replaced marshalling with byte conversion

* removed external css sheet

* review fixes

* Update server/confluence_cloud.go log info

Co-authored-by: Raghav Aggarwal <raghav.aggarwal@brightscout.com>

* removed encryption for admin api token

* improved help text for encryption key

* removed unused var in plugin struct

---------

Co-authored-by: Raghav Aggarwal <raghav.aggarwal@brightscout.com>

* fix issues reported by QA

* Fixed lint and testcases

* fixed import orders

* fixed issue of system admin required for API call

* removed unused vars

* updated the system admin check for webapp based slash command

* updated message for system admin commands

* updated msg for non admin user running confluence commands for server version < 9

---------

Co-authored-by: Raghav Aggarwal <raghav.aggarwal@brightscout.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2: Dev Review Requires review by a core committer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants