# What Happens When a Reviewer Has No Mapped Asana Account in the GitHub-Asana Action

> Discover what happens when a reviewer has no mapped Asana account in the GitHub-Asana Action. Learn how the workflow skips Asana processing silently for unmapped reviewers.

- Repository: [Keita Kitamura/github-asana-request-review-action](https://github.com/keitap/github-asana-request-review-action)
- Tags: how-to-guide
- Published: 2026-03-05

---

**When a pull-request reviewer lacks a mapped Asana account in the action's configuration, the workflow silently skips Asana-related processing for that reviewer without throwing errors or aborting the workflow.**

The `keitap/github-asana-request-review-action` handles unmapped reviewers gracefully by design. When the GitHub login is not found in the `accounts` configuration map, the action creates a placeholder account object and continues processing the pull request. This behavior ensures that teams can adopt the action incrementally without requiring every reviewer to have an Asana account mapping upfront.

## How the Account Lookup Handles Missing Mappings

When processing a pull request review, the action first attempts to resolve the GitHub user to an Asana account via the `accounts` configuration map.

### The fetchAccount Function and NewNoAsanaAccount

In [`handler.go`](https://github.com/keitap/github-asana-request-review-action/blob/main/handler.go), the `fetchAccount` method searches the configuration for a matching GitHub login. If no mapping exists, it returns a placeholder `Account` struct generated by `NewNoAsanaAccount` in [`account.go`](https://github.com/keitap/github-asana-request-review-action/blob/main/account.go)【/account.go#L15-L21】:

```go
// account.go - NewNoAsanaAccount creates the placeholder
func NewNoAsanaAccount(githubLogin string) *Account {
    return &Account{
        GitHubLogin:    githubLogin,
        AsanaUserGID:   "",  // Empty string indicates no Asana mapping
        AsanaWorkspace: "",
    }
}

```

This placeholder object contains an empty `AsanaUserGID` field, which serves as the sentinel value indicating the reviewer has no associated Asana identity.

## The Reviewer Handling Workflow

Once the account object is retrieved—whether valid or a placeholder—the action proceeds to process the reviewer through the `upsertReviewer` method.

### Early Exit for Unmapped Reviewers

In [`handler.go`](https://github.com/keitap/github-asana-request-review-action/blob/main/handler.go) (lines 48-53), the `upsertReviewer` function checks the `AsanaUserGID` field immediately【/handler.go#L48-L53】:

```go
// handler.go - upsertReviewer implementation
func (h *Handler) upsertReviewer(ctx context.Context, featureTask *asana.Task, pr *github.PullRequest, reviewer *Account, state string) error {
    if reviewer.AsanaUserGID == "" {
        log.Printf("reviewer has no asana account: %s", reviewer.GitHubLogin)
        return nil  // Silently skip; no error raised
    }
    
    // ... sub-task creation logic only executes for mapped users ...
    return h.createOrUpdateSubTask(featureTask, reviewer, pr, state)
}

```

When `AsanaUserGID` is empty, the function logs the condition and returns `nil` immediately. This means:

- **No sub-task** is created or updated on the Asana feature task
- **No comment** is posted to the Asana task for this specific reviewer  
- **The workflow continues** processing other reviewers and PR events without interruption

## User-Facing Representation Fallbacks

The action also provides graceful degradation when rendering reviewer information in comments or metadata.

### GitHub Link Fallback in GetUserPermalink

When the placeholder account is used to generate user links—such as in review comments or task descriptions—the `GetUserPermalink` method in [`account.go`](https://github.com/keitap/github-asana-request-review-action/blob/main/account.go) detects the missing Asana GID and falls back to a standard GitHub profile link【/account.go#L38-L44】:

```go
// account.go - Lines 38-44
func (a *Account) GetUserPermalink() string {
    if a.AsanaUserGID == "" {
        return a.GetGitHubUserPermalink()  // Returns https://github.com/<login>
    }
    return fmt.Sprintf("https://app.asana.com/0/%s", a.AsanaUserGID)
}

```

This ensures that even unmapped reviewers appear as clickable links in any generated content, directing users to their GitHub profiles rather than broken Asana links.

## Summary

- **Silent skipping**: Unmapped reviewers trigger a log message but no error or workflow failure
- **Placeholder pattern**: The `NewNoAsanaAccount` function creates sentinel objects with empty `AsanaUserGID` fields
- **Early return logic**: `upsertReviewer` checks for empty GIDs and bypasses Asana API calls immediately
- **Graceful UX**: `GetUserPermalink` automatically falls back to GitHub URLs when Asana mappings are absent
- **Non-blocking**: Missing configurations do not prevent the action from processing other mapped reviewers or completing the workflow

## Frequently Asked Questions

### Does the action fail if a reviewer is not in the accounts map?

No. The action logs a message stating the reviewer has no Asana account and continues processing. The workflow succeeds even when some reviewers lack mappings, making it safe to use with mixed teams where not everyone has an Asana account.

### Can I see which reviewers were skipped in the logs?

Yes. The `upsertReviewer` method in [`handler.go`](https://github.com/keitap/github-asana-request-review-action/blob/main/handler.go) explicitly logs when it encounters an unmapped reviewer with the message format `"reviewer has no asana account: %s"`, where `%s` is the GitHub login. Check your GitHub Actions logs for these entries to identify missing configuration entries.

### What URL will appear for unmapped reviewers in Asana comments?

Unmapped reviewers render as standard GitHub profile links rather than Asana user links. The `GetUserPermalink` method in [`account.go`](https://github.com/keitap/github-asana-request-review-action/blob/main/account.go) detects the empty `AsanaUserGID` and returns the GitHub permalink instead, ensuring no broken links appear in your Asana tasks.

### Is there a way to require Asana mappings for all reviewers?

Currently, no. The action treats unmapped reviewers as "non-Asana" users by design. To enforce mappings, you would need to implement a custom validation step in your workflow file before calling this action, or fork the repository to modify the early-return logic in [`handler.go`](https://github.com/keitap/github-asana-request-review-action/blob/main/handler.go).