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

SD 683 - Custom Commit Status URL #30

Merged
merged 9 commits into from
Oct 23, 2024
Merged

SD 683 - Custom Commit Status URL #30

merged 9 commits into from
Oct 23, 2024

Conversation

yzdann
Copy link

@yzdann yzdann commented Oct 21, 2024

Description

Considerations:

  1. Passing command flags instead of CUSTOM_COMMIT_STATUS_URL_TEMPLATE_PATH: the current implementation is more toward using env variable to flags to keep focus on the implementation of this feature we don't do that
  2. Reading env variable in commitStatusTargetURL instead of loading it in application startup: the current code doesn't have the flexibility to read the env on start-up and expose as config it to the rest of the application. To change
    that we need to change a couple of functions signature and it goes out of scope for this PR. see here

Read this PR commit by commit, to understand the changes:

Feature:

Extra Adjustments:

This will be used for CUSTOM_COMMIT_STATUS_URL_TEMPLATE_PATH

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@yzdann yzdann self-assigned this Oct 21, 2024
@yzdann yzdann force-pushed the SD-683 branch 2 times, most recently from 03d4551 to 359a04b Compare October 21, 2024 13:24
@@ -0,0 +1 @@
{{ $calculated_time := .CommitTime.Add -600000000000 }}https://custom-url.com?time={{.CommitTime.UnixMilli}}&calculated_time={{$calculated_time.UnixMilli}}
Copy link
Author

@yzdann yzdann Oct 21, 2024

Choose a reason for hiding this comment

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

a bit more complicated calculations that we might use:

.CommitTime.Add -600000000000

is equal to:

CommitTime.Add(-10*time.Minute).UnixMilli()

@yzdann yzdann changed the title Sd 683 SD 683 - Custom Commit Status URL Oct 21, 2024
@yzdann yzdann marked this pull request as ready for review October 21, 2024 14:07
hnnsgstfssn
hnnsgstfssn previously approved these changes Oct 22, 2024
internal/pkg/githubapi/github.go Outdated Show resolved Hide resolved
internal/pkg/githubapi/github.go Outdated Show resolved Hide resolved
internal/pkg/githubapi/github.go Show resolved Hide resolved
internal/pkg/githubapi/github.go Show resolved Hide resolved
@yzdann yzdann merged commit a43d3d1 into main Oct 23, 2024
5 checks passed
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