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

Discussion for CUSTOM_TEXT feature #6

Open
amychurchwell opened this issue Oct 7, 2020 · 1 comment
Open

Discussion for CUSTOM_TEXT feature #6

amychurchwell opened this issue Oct 7, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@amychurchwell
Copy link

CUSTOM_TEXT is currently out of scope for a feature request because the proposed solution of deleting the entire repo and recreating it for the correct contribution history on a repo is outside the permissions of GITHUB_TOKEN. However, I think it's a super cool idea & I'd love to explore it more.

Unfortunately though, commits made on a GitHub repository will always show on the graph even if those commits are later removed through a force push.

According to the github contribution docs the commits that are counted in the graph are "in the repository's default branch". My first thought was that the commit history could be added to a different branch that replaces the repo's default branch, then the original default branch is deleted.

However: at a glance, it does not seem that the token is allowed to delete anything whatsoever? And It's unclear if it's allowed to change the default branch of a repo. 🤔

@amychurchwell amychurchwell added the enhancement New feature or request label Oct 7, 2020
@bcanseco
Copy link
Owner

bcanseco commented Oct 10, 2020

Now that I think more about it, my original idea of deleting the entire repo would probably get hairy if that deletion happens on a GitHub Actions run within that repo. 😅

I like the idea to change the default branch to accomplish this, though. We could document in the README that anyone wanting to use CUSTOM_TEXT would need to provide a personal access token with the repos scope instead of the normal GITHUB_TOKEN.


2023 edit: this might be easier now with in-yaml customization of GITHUB_TOKEN permissions: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants