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

fix: Warn users when GitHub Actions is making a merge commit #222

Merged
merged 9 commits into from
Aug 24, 2023

Conversation

srijan-deepsource
Copy link
Contributor

changes:

  • Change signature of gitGetHead to return a warning for GitHub Actions merge commits
  • Propagate the warning to report command response

changes:
  - Change signature of `gitGetHead` to return a warning for GitHub Actions merge commits
  - Propagate the warning to `report` command response
Resolved issues in command/report/report.go with DeepSource Autofix
srijan-deepsource and others added 4 commits August 23, 2023 16:45
Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>
Pass the head commit picked up from context as an env variable. This would be picked up by the report command, and no git logic would need to be executed.
// before this is checked. Since this is guaranteed to be set if artifact is sent using our GitHub action,
// we can reliably send the commit SHA, and no git commands are executed, making the actions work all the time. \o/

// We are setting PR's head commit as default using github context as env variable: "GHA_HEAD_COMMIT_SHA"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

command/report/git.go Outdated Show resolved Hide resolved
command/report/git.go Outdated Show resolved Hide resolved
command/report/git.go Outdated Show resolved Hide resolved
Signed-off-by: Sourya Vatsyayan <sourya@deepsource.io>
@srijan-deepsource srijan-deepsource merged commit d4b93a6 into master Aug 24, 2023
1 check passed
@srijan-deepsource srijan-deepsource deleted the lae-8992 branch August 24, 2023 07:52
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.

3 participants