Skip to content

Commit

Permalink
Merge pull request #44 from grafana/GH-output-label
Browse files Browse the repository at this point in the history
emit chosen label in GH output
  • Loading branch information
armandgrillet authored Aug 9, 2024
2 parents aa440d3 + 386dbe0 commit 87a42c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ic-assignment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ outputs:
description: "The output property of the assigned person. If output property is empty, name is used instead"
runs:
using: "docker"
image: "docker://ghcr.io/grafana/issue-team-scheduler-ic-assignment:v0.14"
image: "docker://ghcr.io/grafana/issue-team-scheduler-ic-assignment:v0.15"
6 changes: 6 additions & 0 deletions pkg/labeler/labeler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/google/go-github/github"
githubaction "github.com/grafana/escalation-scheduler/pkg/github-action"
)

type labelAssigner func(repoOwner, repoName string, issueNumber int, labels []string) error
Expand Down Expand Up @@ -66,6 +67,11 @@ func (l *Labeler) Run(issue *github.Issue) error {
return err
}

err = githubaction.SetOutput("assignedLabel", label)
if err != nil {
return err
}

level.Info(l.logger).Log("msg", "completed successfully")

return nil
Expand Down
2 changes: 1 addition & 1 deletion regex-labeler/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ inputs:
description: "GitHub token to use for API calls"
runs:
using: "docker"
image: "docker://ghcr.io/grafana/issue-team-scheduler-regex-labeler:v0.14"
image: "docker://ghcr.io/grafana/issue-team-scheduler-regex-labeler:v0.15"

0 comments on commit 87a42c9

Please sign in to comment.