-
Notifications
You must be signed in to change notification settings - Fork 152
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
[GH-618]: Added slack attachment for webhook posts, in order to comment, edit, and close issues. #636
Open
Nityanand13
wants to merge
21
commits into
mattermost:master
Choose a base branch
from
Brightscout:MM-618
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[GH-618]: Added slack attachment for webhook posts, in order to comment, edit, and close issues. #636
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
cbb804e
[MI-2502]:Added custom type for webhook post in order to comment, edi…
Nityanand13 4378034
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
Nityanand13 20ab25d
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
Nityanand13 70ae885
[MI-2736]: Done the review fixes of a github PR #636 (#20)
Nityanand13 3cecd5d
[MI-2736]: Done the review fixes of a github PR #636 (#21)
Nityanand13 779f10f
[MI-2814] Done the review fixes of github PR #636 (#22)
Nityanand13 67c370b
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
Nityanand13 2de4435
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
ayusht2810 0f40aba
[MM-618] Update validations, modal title, styling, post messages, con…
ayusht2810 f4f5057
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
ayusht2810 9f7af14
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
ayusht2810 d0e7abd
[MM-618] Remove constants and serializers package
ayusht2810 1a279e8
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
ayusht2810 39fe3cf
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
raghavaggarwal2308 c5a8d29
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
raghavaggarwal2308 136221f
[MM-556] Review fixes
raghavaggarwal2308 482fcf9
[MM-617]: converted the custom post to slack attachment for issue cre…
Kshitij-Katiyar 79c266e
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
Kshitij-Katiyar 28300d5
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
Kshitij-Katiyar b413828
[MM-618]: Fixed the lint
Kshitij-Katiyar 64655a0
Merge branch 'master' of github.com:mattermost/mattermost-plugin-gith…
Kshitij-Katiyar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package constants | ||
|
||
import "time" | ||
|
||
const ( | ||
APIErrorIDNotConnected = "not_connected" | ||
// TokenTTL is the OAuth token expiry duration in seconds | ||
TokenTTL = 600 | ||
|
||
RequestTimeout = 30 * time.Second | ||
OauthCompleteTimeout = 2 * time.Minute | ||
HeaderMattermostUserID = "Mattermost-User-ID" | ||
OwnerQueryParam = "owner" | ||
RepoQueryParam = "repo" | ||
NumberQueryParam = "number" | ||
PostIDQueryParam = "postId" | ||
|
||
IssueStatus = "status" | ||
AssigneesForProps = "assignees" | ||
LabelsForProps = "labels" | ||
DescriptionForProps = "description" | ||
TitleForProps = "title" | ||
IssueNumberForProps = "issue_number" | ||
IssueURLForProps = "issue_url" | ||
RepoOwnerForProps = "repo_owner" | ||
RepoNameForProps = "repo_name" | ||
|
||
Close = "Close" | ||
Reopen = "Reopen" | ||
|
||
IssueCompleted = "completed" | ||
IssueNotPlanned = "not_planned" | ||
IssueClose = "closed" | ||
IssueOpen = "open" | ||
|
||
// Actions of webhook events | ||
ActionOpened = "opened" | ||
ActionClosed = "closed" | ||
ActionReopened = "reopened" | ||
ActionSubmitted = "submitted" | ||
ActionLabeled = "labeled" | ||
ActionAssigned = "assigned" | ||
ActionCreated = "created" | ||
ActionDeleted = "deleted" | ||
ActionEdited = "edited" | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://go.dev/blog/package-names
What value does a separate package provide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hanzei Keeping things in separate package helps us in writing unit tests and creating mocks for packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4/5 that a
constants
package is not an idiomatic way to store variables, as it contradicts the above quote.