Skip to content

Commit 0677eb9

Browse files
authored
Cleanup: Remove workflow cancellation API calls from compiler (#1630)
1 parent 225f0ca commit 0677eb9

16 files changed

Lines changed: 18 additions & 125 deletions

.changeset/patch-remove-workflow-cancellation-api.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/brave.lock.yml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/pdf-summary.lock.yml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/plan.lock.yml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/poem-bot.lock.yml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/q.lock.yml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/scout.lock.yml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/tidy.lock.yml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/unbloat-docs.lock.yml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/workflow/create_issue.go

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -69,29 +69,8 @@ func (c *Compiler) buildCreateOutputIssueJob(data *WorkflowData, mainJobName str
6969

7070
var steps []string
7171

72-
// Add permission checks if no task job was created but permission checks are needed
73-
if !taskJobCreated && c.needsRoleCheck(data, frontmatter) {
74-
// Add team member check step
75-
steps = append(steps, " - name: Check team membership for workflow\n")
76-
steps = append(steps, " id: check-team-member\n")
77-
steps = append(steps, " uses: actions/github-script@v8\n")
78-
79-
// Add environment variables for permission check
80-
steps = append(steps, " env:\n")
81-
steps = append(steps, fmt.Sprintf(" GITHUB_AW_REQUIRED_ROLES: %s\n", strings.Join(data.Roles, ",")))
82-
83-
steps = append(steps, " with:\n")
84-
steps = append(steps, " script: |\n")
85-
86-
// Generate the JavaScript code for the permission check
87-
scriptContent := c.generateRoleCheckScript(data.Roles)
88-
scriptLines := strings.Split(scriptContent, "\n")
89-
for _, line := range scriptLines {
90-
if strings.TrimSpace(line) != "" {
91-
steps = append(steps, fmt.Sprintf(" %s\n", line))
92-
}
93-
}
94-
}
72+
// Permission checks are now handled by the separate check-membership job
73+
// which is always created when needed (when activation job is created)
9574

9675
// Build custom environment variables specific to create-issue
9776
var customEnvVars []string

0 commit comments

Comments
 (0)