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

'before' and 'after' key in action event_data #33395

Open
key262yek opened this issue Jan 25, 2025 · 0 comments
Open

'before' and 'after' key in action event_data #33395

key262yek opened this issue Jan 25, 2025 · 0 comments
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@key262yek
Copy link

Feature Description

When a PR is synchronized, GitHub's event data includes before and after keys, representing the head commit hashes of the previous and current pushes. However, Gitea's equivalent does not provide this information.

This is essential for developing an AI code-review action that reviews only the current changes by parsing the diff between two commit SHAs.

https://github.com/aidar-freeed/ai-codereviewer/blob/a9a064dfa1db8c83f40ef63f6e247fa09c935ed6/src/main.ts#L197-L209

  } else if (eventData.action === "synchronize") {
    const newBaseSha = eventData.before;
    const newHeadSha = eventData.after;


    const response = await octokit.repos.compareCommits({
      headers: {
        accept: "application/vnd.github.v3.diff",
      },
      owner: prDetails.owner,
      repo: prDetails.repo,
      base: newBaseSha,
      head: newHeadSha,
    });

Is there any way to get this information? or do you have any plan to provide such information?

Screenshots

No response

@key262yek key262yek added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jan 25, 2025
@Zettat123 Zettat123 added the topic/gitea-actions related to the actions of Gitea label Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants