ueman / feedback

A simple widget for getting better feedback.
https://pub.dev/packages/feedback
395 stars 96 forks source link

feature: add feedback_github #277

Closed defuncart closed 7 months ago

defuncart commented 7 months ago

STATUS

Bildschirmfoto 2024-02-24 um 17 40 48

API Considerations

Adding a new package feedback_github, however perhaps a common package feedback_git could also be considered. This would be a breaking change for feedback_gitlab.

:scroll: Description

Similar to feedback_gitlab, adds ability to create an issue on GitHub with user's feedback.

:bulb: Motivation and Context

Suggestion for #269

:green_heart: How did you test it?

N/A

:pencil: Checklist

:crystal_ball: Next steps

N/A

mg3994 commented 7 months ago

Image Uploading to Issue Body , Please do add logic for those too

defuncart commented 7 months ago

@mg3994 This can be tested by adding feedback_github as a dependency

dependencies:
  feedback_github:
    git: 
      url: https://github.com/defuncart/fork_feedback/
      path: feedback_github
      ref: feature/add-create-issue-on-github

dependency_overrides:
  feedback:
    git: 
      url: https://github.com/defuncart/fork_feedback/
      path: feedback
      ref: feature/add-create-issue-on-github

and then use as follows

BetterFeedback.of(context).showAndUploadToGitHub(
  username: 'username',
  repository: 'repository',
  authToken: 'github_pat_',
  labels: ['feedback'],
  assignees: ['username'],
  customMarkdown: '**Hello World**,
  imageId: Uuid().v4(),
);

where the pat has content and issue write access. NOTE that a branch called issue_images on repository is required for the images to be uploaded to.

ueman commented 7 months ago

Hey, thanks for the contribution, but unfortunately I don't really feel comfortable putting this on pub.dev. Embedding a write token for your repository seems like a very bad idea and security risk to me.

defuncart commented 7 months ago

@ueman No problem, I'll move the code over to my own repository and add a comment to #269.

mg3994 commented 7 months ago

Thats great as you understand the value of PAT , Thanks for considering and putting some time on it ,

defuncart commented 7 months ago

Source code moved to feedback_github. There are currently no plans to release this package to pub.dev, however it can be used as is.

Rocke1001feller commented 5 months ago

@defuncart I just wanted to drop a quick note to say how impressed I am by your work. Your feedback_github are simply outstanding! Thanks for sharing your talent with the community! image