Lesson 3 of 5 Flow of Work and Traceability

Designing Feedback Cycles with Notifications and GitHub Issues

This lesson explains how to return useful signals to the people who can act on them.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the nested loops of delivery feedback.
  • Design a notification strategy that favours relevance.
  • Write a GitHub issue form.
  • Explain how issues close through pull requests.

What a feedback cycle is

Every delivery process produces signals: a failing test, a review comment, a rising error rate or a user's complaint. A feedback cycle is the route that such a signal takes back to a person who can do something about it. Two properties determine its value. The first is latency, which is how long the signal takes to arrive. The second is relevance, which means whether it reaches the right person with enough context to act.

Fixing a defect costs much less when the author still remembers the change. A unit test that fails within two minutes of a push gives feedback while the developer is still in context, whereas a defect reported by a customer three weeks later requires someone to rediscover how the code works. A good design therefore has several nested loops, from the fastest to the slowest.

LoopSignalTypical latency
LocalEditor warnings, pre-commit hooks, local testsSeconds
Pull requestStatus checks, code review, scansMinutes to hours
PipelineIntegration tests, deployment to a test environmentMinutes to hours
ProductionTelemetry, alerts, feature flag resultsMinutes
CustomerIssues, support tickets, surveysDays to weeks
Sort into groups

Which feedback loop?

Exam skills 1.1.2

Place each signal in the loop that carries it back to the team.

Log in to try this activity Interactive activities are free with an account.

Designing useful notifications

Notifications are the delivery mechanism for most feedback, and they fail in a predictable way. When people receive too many, they create mail rules and stop reading them, and a genuine failure then goes unnoticed. A notification strategy should therefore favour precision over volume.

Notifications in Azure DevOps

Azure DevOps has personal notifications, set by each user, and team and project subscriptions, set by administrators. A subscription combines an event, such as a failed build, with filters, such as a repository or branch, and a delivery target. Default subscriptions already notify a user when a pull request needs their review, and when a build that they requested fails.

Notifications in GitHub

A GitHub user chooses to watch a repository fully, follow only participating activity, or follow custom events. Notifications reach the web inbox or email. Workflow run notifications can be limited to failures. CODEOWNERS brings the right reviewers into a pull request automatically, which is itself a targeted notification, because only people responsible for the changed path are asked.

Routing rules

The following principles apply to both platforms. Send failures to the person who caused them or the team that owns the component. Send information that a whole team needs to a shared channel, such as a Microsoft Teams channel, instead of many private emails. Do not notify people of success, unless someone is waiting for that result. Treat each repeated notification that nobody acts on as a defect in the design, and remove it.

The following diagram compares pipeline notifications for a 60-person engineering group before and after they are redesigned.

Before and after for pipeline notifications. Before, all 60 engineers got an email for every run on every branch, so a failed production deployment went unnoticed for six hours. After, a team subscription sends only failed production runs to the owning team's Teams channel, and an Azure Monitor alert reports user-facing problems.
The scenario is illustrative.
Select all that apply

Notifications people act on

Exam skills 1.1.2

Pick the notification rules that keep feedback precise.

Log in to try this activity Interactive activities are free with an account.

Collecting feedback with GitHub Issues

GitHub Issues is the human end of the feedback loop, especially for open-source and internal platform teams. A blank issue produces uneven reports, and the triage effort falls on maintainers, so repositories define issue templates. An issue form is a YAML template stored in .github/ISSUE_TEMPLATE/ that shows a web form with required fields and drop-down lists.

name: Bug report
description: Report a problem with the application
labels: ["bug", "needs-triage"]
body:
  - type: input
    id: version
    attributes:
      label: Version
    validations:
      required: true
  - type: textarea
    id: steps
    attributes:
      label: Steps to reproduce
    validations:
      required: true

Every issue raised with this form receives the bug and needs-triage labels, and it cannot be submitted without a version and reproduction steps. Maintainers can then filter on needs-triage, apply priority labels, and add the issue to a project.

Issues close the loop when they connect to code. A pull request description containing a keyword such as Closes #42 or Fixes #42 links the issue, and merging the pull request into the default branch closes it. The reporter receives a notification, and so learns that the change is complete. GitHub Discussions is better suited to open questions and ideas, because a discussion has no fixed definition of done, and it can be converted to an issue once it becomes actionable.

Scenario questions

Issues that close the loop

Exam skills 1.1.2

Apply issue forms, closing keywords and Discussions to feedback scenarios.

Log in to try this activity Interactive activities are free with an account.
Worked example

Fixing an ignored alert

All 60 members of an engineering group receive an email for every pipeline run on all branches. A production deployment failed last week, and nobody noticed for six hours. What should you change?

The defect is low relevance: the volume has trained people to ignore the emails. You should remove the broad subscription, then create a team subscription filtered to failed runs of the production pipeline, and post those events to the owning team's Teams channel. Success notifications should stop. Sending the emails to more people, or sending them more often, would increase the volume that caused the problem. An alert from Azure Monitor on the application's health would also shorten detection, because it reports a user-facing problem regardless of the state of the pipeline.

Check yourself

Where does a GitHub issue form live, and in what format?

Show answer

It is a YAML file in .github/ISSUE_TEMPLATE/. The form can mark fields as required, which gives maintainers consistent reports.

Exam Tips

Remember for the exam

  • Good feedback is both fast and relevant.
  • Send failures to whoever can act; do not notify people of routine success.
  • Issue forms use YAML in .github/ISSUE_TEMPLATE/ and can make fields required.
  • Closes #42 in a pull request closes the issue when merged into the default branch.
  • Team subscriptions in Azure DevOps combine an event, filters and a delivery target.