Skip to content

Conversation

@ZIJ
Copy link
Contributor

@ZIJ ZIJ commented Nov 20, 2025

🧠 AI Assistance Disclosure Policy

Important

Inspired by ghostty.
If you used any AI assistance while contributing to Digger, you must disclose it in this PR.


✅ AI Disclosure Checklist

  • I understand that all AI assistance must be disclosed.
  • I did not use AI tools in this contribution.
  • I used AI tools and have disclosed details below.

Details (if applicable):

used codex heavily


💡 Notes

  • Trivial auto-completions (single words, short phrases) don’t need disclosure.
  • Contributors must understand and take responsibility for any AI-assisted code.
  • Failure to disclose is considered disrespectful to maintainers and may delay review.

@ZIJ ZIJ changed the title [WIP] Switch from callbacks to webhooks for repos Switch from callbacks to webhooks for repos Nov 21, 2025
@ZIJ ZIJ requested review from breardon2011 and motatoes November 21, 2025 21:32
@ZIJ ZIJ force-pushed the feat/repos-webhooks branch from ceb95d5 to 0dca4b0 Compare November 21, 2025 21:42

accountLogin, accountId := getAccountDetails(installation.Installation.Account)

link, err := models.DB.GetGithubInstallationLinkForInstallationId(installationId)
Copy link
Contributor

Choose a reason for hiding this comment

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

in case its first instllation the link will only be created on the callback and here we depend on it so we need a retry mechanism incase the webhook arrives before the callback over here. We can retry like 3 to 5 times to fetch the link and if not we call it a failure

Copy link
Contributor

@motatoes motatoes left a comment

Choose a reason for hiding this comment

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

In the callback function there is this part on top

	if !codeExists || len(codeParams) == 0 {
		slog.Error("There was no code in the url query parameters")
		c.String(http.StatusBadRequest, "could not find the code query parameter for github app")
		return
	}

However since moving updates to webhook a missing code parameter is no longer considered an error (the update will happen in the webhook) so that step should return a success message

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