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

[FEAT]: Enumerationize GitHubCommitFile.Status #2930

Open
1 task done
zhiliangpt opened this issue Jun 10, 2024 · 0 comments
Open
1 task done

[FEAT]: Enumerationize GitHubCommitFile.Status #2930

zhiliangpt opened this issue Jun 10, 2024 · 0 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request

Comments

@zhiliangpt
Copy link

zhiliangpt commented Jun 10, 2024

Describe the need

Inside:

    [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly")]
    public GitHubCommitFile(string filename, int additions, int deletions, int changes, string status, string blobUrl, string contentsUrl, string rawUrl, string sha, string patch, string previousFileName)
    {
        Filename = filename;
        Additions = additions;
        Deletions = deletions;
        Changes = changes;
        Status = status;
        BlobUrl = blobUrl;
        ContentsUrl = contentsUrl;
        RawUrl = rawUrl;
        Sha = sha;
        Patch = patch;
        PreviousFileName = previousFileName;
    }

... we have GitHubCommitFile.Status as string equals "added", "modified", "removed", "renamed", etc.

These Statuses do not co-exist for a given commit, so it would be ideal to handle them as enumerations to minimize errors in the code with more elegance.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@zhiliangpt zhiliangpt added Status: Triage This is being looked at and prioritized Type: Feature New feature or request labels Jun 10, 2024
@nickfloyd nickfloyd moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Jun 14, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

2 participants