-
Notifications
You must be signed in to change notification settings - Fork 783
feat: Issue Events #438
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
Merged
Merged
feat: Issue Events #438
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
1c6cee1
feat(issue_events): Show events on issues
brandly 332ea33
style(issue_events): Added styles to "added label" event
brandly db7db99
style(issue_events): Add icon & improve styling of added labels
brandly 20ea5dd
style(issue_events): Improve <ReviewRequested /> styles
brandly 77fe340
feat(issue_events): Remove mentioned/subscribed events from UI
brandly ed535e4
feat(issue_events): Define <Closed /> events
brandly 484b4e5
refactor(issue_events): Extract <EventIcon /> and <Date />
brandly cb772e1
feat(issue_events): Add `unlabled` prop to <Labeled />
brandly 743d9ad
feat(issue_events): Define <Merged /> event
brandly 174731d
feat(issue_events): Filter out `closed` events preceded by `merged`
brandly 0f3d37c
feat(issue_events): Define <HeadRef /> events
brandly 9321669
feat(issue_events): Define <Assigned /> events
brandly ab19588
feat(issue_events): Define <Reopened /> & <Renamed /> events
brandly b0321b6
refactor(issue_events): Render <Text /> from <ActorLink />
brandly 63af0ba
style(issue_events): Trim issue names to ensure spacing
brandly 4a38709
feat(issue_events): Define <Locked /> event
brandly 27ba458
feat(issue_events): Define <Milestoned /> event
brandly 0278d06
refactor(issue_events): Clean up authUser from LabeledComponent
brandly 539a44c
feat(issue_events): Define <MarkedAsDuplicate /> event
brandly 49f3324
refactor(issue_events): Define generic <Event /> component
brandly adad844
docs(readme): Add @brandly as a contributor
brandly c63ff80
feat(issue_events): Define <LabelGroup /> for list of label changes
brandly 3221bcf
refactor(issue_events): Use spread operator for textChildren
brandly 1d592ed
Merge branch 'master' into patch-1
andrewda 652c104
style(issue_events): Add blank line after external imports
brandly e402d59
feat(issue_events): <InlineLabel /> has rounded corners
brandly 192977f
refactor(issue_events): Move <InlineLabel /> into own file
brandly 5f80edd
feat(issue_events): Press username in events to view profile
brandly ba61126
refactor(events): Inline most <Event />s into <IssueEventListItem />
brandly fb5a018
refactor(events): Eliminate <Date /> since its only used once
brandly 0bb5415
refactor(events): Extract formatEventsToRender into event-helpers
brandly 7322576
Merge branch 'master' into patch-1
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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -379,3 +379,14 @@ export const fetchNotificationsCount = accessToken => | |
|
||
export const fetchRepoNotificationsCount = (owner, repoName, accessToken) => | ||
v3.count(`/repos/${owner}/${repoName}/notifications?per_page=1`, accessToken); | ||
|
||
export const fetchIssueEvents = ( | ||
owner: string, | ||
repoName: string, | ||
issueNum: number, | ||
accessToken: string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Types make function declaration clearer. But in other functions we never write them. |
||
) => | ||
v3.getJson( | ||
`/repos/${owner}/${repoName}/issues/${issueNum}/events`, | ||
accessToken | ||
); |
This file contains hidden or 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 hidden or 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 @@ | ||
import React, { Component } from 'react'; | ||
import { StyleSheet, Text } from 'react-native'; | ||
|
||
import { normalize } from 'config'; | ||
import { getFontColorByBackground } from 'utils'; | ||
|
||
const styles = StyleSheet.create({ | ||
inlineLabel: { | ||
fontSize: normalize(10), | ||
fontWeight: 'bold', | ||
padding: 3, | ||
paddingLeft: 5, | ||
paddingRight: 5, | ||
margin: 2, | ||
borderWidth: 1, | ||
overflow: 'hidden', | ||
borderRadius: 2, | ||
minWidth: 50, | ||
textAlign: 'center', | ||
}, | ||
}); | ||
|
||
export class InlineLabel extends Component { | ||
props: { | ||
label: Object, | ||
}; | ||
|
||
render() { | ||
const { color, name } = this.props.label; | ||
|
||
return ( | ||
<Text | ||
style={[ | ||
styles.inlineLabel, | ||
{ | ||
backgroundColor: `#${color}`, | ||
color: getFontColorByBackground(color), | ||
borderColor: `#${color}`, | ||
}, | ||
]} | ||
> | ||
{name} | ||
</Text> | ||
); | ||
} | ||
} |
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.
🎉