-
Notifications
You must be signed in to change notification settings - Fork 6
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
Commit message intermittently missing package name #66
Comments
Hi, thanks for reporting. There was a pull request recently regarding to the messages. It was a bit messy. I tried to clean up afterwards but it may have some bugs. |
Maybe related #67 |
Apologies for the delay in response. I have confirmed that this bug is still occurring in 0.4.1. |
Yeah I figured that missing error handle wasnt the cause. Its very unlikely it accually error something like strings.Builder.Write, or what it was. Does it actually change images when it commits those messages? |
Yeah, it still updates the images. |
Can you share the actual image ref? You can anonymize some parts, |
Sure. Our repo isn't available to the internet, but the image in this instance was [[channel]]
name = "nexus"
decoder = "kub.nexus@v1"
[[decoder]]
name = "kub.nexus@v1"
script = """
load("encoding/json.star", "json")
def main(input):
data = json.decode(input)
action = data.get("action", None)
if action != "CREATED" and action != "UPDATED":
fail("skipping action: " + action)
component = data.get("component", None)
name = component.get("name", None)
version = component.get("version", None)
image = "nexus.kub.org/{}:{}".format(name, version)
output = [image]
return output
"""
[[pipeline]]
name = "argocd-devops"
repo_uri = "[email protected]:platform/argocd-devops?ref=main"
dest_branch = "kobold"
channels = ["nexus"]
post_hook = "kub.github-pr@v1"
[[post_hook]]
name = "kub.github-pr@v1"
script = """
load("http.star", "http")
def main(repo, src_branch, dest_branch, title, body, changes, warnings):
parts = repo.split("/")
name = parts[-1]
owner = parts[-2].split(":")[-1]
url = "https://github.kub.org/api/v3/repos/" + owner + "/" + name + "/pulls"
headers = {
"Accept": "application/vnd.github+json",
"Authorization": "Bearer " + host_env["GITHUB_TOKEN"],
"X-GitHub-Api-Version": "2022-11-28",
}
data = {"title": title, "body": body, "head": dest_branch, "base": src_branch}
res = http.post(url, headers = headers, json_body = data)
if res.status_code != 201:
print("hook: pr failed: base=" + src_branch + " head=" + dest_branch + " repo=" + repo)
return res.body()
print("github pr created: " + res.json()["url"])
return None
""" This relevant parts of the webhook payload are as follows: {
"action": "CREATED",
"component": {
"name": "backstage",
"version": "1.10.1"
}
} |
I have noticed on a couple of occasions that the commit message is just "chore(kobold): ". I am not sure of the cause. The issue appears to be intermittent, because often when I re-trigger the webhook it works.
The text was updated successfully, but these errors were encountered: