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

CICD: GitHub Action check git status #2817

Merged

Conversation

cafferata
Copy link
Collaborator

@cafferata cafferata commented Jan 26, 2024

Check the git status with the GitHub Action check-git-status and if a git diff occurs, post a comment with the same message as .github/pull_request_template.md the pipeline will not be green/successful.

Refs: #2704 (comment) #2712 #2803

@cafferata cafferata force-pushed the github-action-check-git-status branch from 64fe408 to 626dc2a Compare January 26, 2024 20:19
@tlimoncelli
Copy link
Contributor

CatChen/check-git-status-action looks super useful! In addition to go generate people often forget to go fmt and go mod tidy

@cafferata cafferata force-pushed the github-action-check-git-status branch from 626dc2a to 151dba3 Compare January 26, 2024 20:22
@cafferata
Copy link
Collaborator Author

Sorry, testing to the wrong GitHub repository.

@cafferata cafferata marked this pull request as draft January 26, 2024 20:23
@cafferata cafferata force-pushed the github-action-check-git-status branch 3 times, most recently from b26222d to 6b6245b Compare January 26, 2024 20:32
@cafferata cafferata marked this pull request as ready for review January 26, 2024 20:51
@cafferata cafferata force-pushed the github-action-check-git-status branch 2 times, most recently from 2c2677e to f4fce82 Compare January 26, 2024 20:53
@cafferata
Copy link
Collaborator Author

Too bad! The GitHub action comment (example cafferata#5 (review)) is not coming through from the fork repository! The problem is with ${{ secrets.GITHUB_TOKEN }}.

@cafferata cafferata marked this pull request as draft January 26, 2024 20:55
@cafferata cafferata force-pushed the github-action-check-git-status branch 2 times, most recently from 2f84078 to 045a552 Compare January 26, 2024 21:06
@cafferata cafferata force-pushed the github-action-check-git-status branch from 045a552 to acf5f7b Compare January 26, 2024 21:09
@cafferata
Copy link
Collaborator Author

Added a second commit that removes the request-changes because there are not enough permissions from a GitHub fork repository to post a review/comment.

https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

@cafferata cafferata marked this pull request as ready for review January 26, 2024 21:11
@tlimoncelli tlimoncelli merged commit d1b599b into StackExchange:main Jan 28, 2024
2 checks passed
@cafferata cafferata deleted the github-action-check-git-status branch February 4, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants