GH-900 · Domain 3: Collaborate using GitHub · 14% of the exam
Task 3.1: Collaboration tools
Issues, pull requests and discussions, linking pull requests to issues, templates, filters and assignments, notifications, and sharing information with gists, wikis and GitHub Pages.
Study it
Issues, sub-issues and issue types
Lesson coming
Pull requests and reviews, and linking them to issues
Lesson coming
Templates, issue forms, filters and assignments
Lesson coming
Discussions and notifications
Lesson coming
Gists, wikis and GitHub Pages
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the GitHub documentation page that proves it.
Question 1 · choose 1
Users of an open source library keep opening issues to ask how to configure it. The maintainers want the issue list kept for bugs and planned work, and want a place where users ask questions and the best reply is marked as the answer. What should they enable?
AA new label named question for those issues
BGitHub Discussions, with a question-and-answer category
CA gist that collects the frequently asked questions
DThe repository wiki, with a page for each question and its answer
Show the answer and why
AA new label named question for those issues
Incorrect
Questions would still fill the issue list the maintainers want to keep for bugs.
BGitHub Discussions, with a question-and-answer category
Correct
Discussions is for questions and conversation, and answers can be marked in Q&A categories.
CA gist that collects the frequently asked questions
Incorrect
A gist shares snippets; users can't ask questions there and have answers marked.
DThe repository wiki, with a page for each question and its answer
Incorrect
A wiki hosts documentation; it doesn't let users ask questions and mark answers.
GitHub Discussions lets a community ask and answer questions, share information, make announcements and hold conversations about a project, without third-party tools. In question-and-answer categories, comments can be marked as answers to help users find information quickly. Issues are better suited to tracking bugs, features and tasks.
A pull request's description says "Fixes #212". The pull request was opened against the release-1.4 branch rather than main and is merged there, but issue 212 stays open. Why?
AFixes isn't a supported closing keyword on release branches, so Closes should have been used
BThe keyword must be in the pull request title, not in its description
CIssues close only after a repository administrator approves the link
DThe keywords only work when the pull request targets the default branch
Show the answer and why
AFixes isn't a supported closing keyword on release branches, so Closes should have been used
Incorrect
Fixes is a supported keyword, along with close, closes, closed and resolves.
BThe keyword must be in the pull request title, not in its description
Incorrect
Keywords work in the description or in a commit message, provided the pull request targets the default branch.
CIssues close only after a repository administrator approves the link
Incorrect
No approval is needed; merging into the default branch closes linked issues.
DThe keywords only work when the pull request targets the default branch
Correct
Because the pull request targeted release-1.4, the keyword was ignored and no link was created.
You can link a pull request to an issue with a supported keyword in the description or a commit message. When the linked pull request is merged into the repository's default branch, the issue closes automatically. The keywords are interpreted only when the pull request targets the default branch; if it targets any other branch, they are ignored and merging has no effect on the issues.
A maintainer wants every bug report opened from the repository's bug template to arrive already carrying the title prefix "[Bug]: ", the bug label and the triage lead as assignee, whoever opens it. She doesn't want to run or maintain any automation for this. What should she set up?
AA CODEOWNERS file that makes the triage lead the owner of every path
BTitle, labels and assignees fields in the YAML frontmatter of the bug template
CA CONTRIBUTING file telling reporters to add the bug label and assign the triage lead
D"Labels: bug" and "Assignee: @triage-lead" lines in the body of the bug template
Show the answer and why
AA CODEOWNERS file that makes the triage lead the owner of every path
Incorrect
Code owners are requested for review on pull requests that change their files; CODEOWNERS doesn't label or assign new issues.
BTitle, labels and assignees fields in the YAML frontmatter of the bug template
Correct
Frontmatter fields set a default title and apply the labels and assignees to every issue raised from that template.
CA CONTRIBUTING file telling reporters to add the bug label and assign the triage lead
Incorrect
Guidelines only tell people how to contribute; reports still arrive without the label and assignee unless each reporter adds them.
D"Labels: bug" and "Assignee: @triage-lead" lines in the body of the bug template
Incorrect
Body text is content the reporter can edit or delete; it doesn't apply a label or an assignee to the issue.
Markdown issue templates live in the .github/ISSUE_TEMPLATE folder and start with YAML frontmatter that the new issue page reads. Besides the template's name and description, the frontmatter (or the template builder's "Optional additional information" fields) can set a default issue title, apply labels and assign people with read access to the repository, for every issue raised from the template. The template's body is only suggested content, and contributing guidelines only describe how people should contribute.
A developer uses a popular open source library and wants a notification when it publishes a new release, but nothing about its issues, pull requests or discussions. How should he set the repository's watch settings?
AChoose All Activity, then filter the emails
BChoose Ignore, so only releases still come through
CStar the repository
DChoose Custom and select only Releases
Show the answer and why
AChoose All Activity, then filter the emails
Incorrect
All Activity notifies him about every conversation in the repository.
BChoose Ignore, so only releases still come through
Incorrect
Ignore stops all notifications for the repository, including releases.
CStar the repository
Incorrect
Starring doesn't send release notifications.
DChoose Custom and select only Releases
Correct
Custom watch settings notify you only for the event types you choose.
You can customize notifications for a repository, for example to be notified only when one or more types of events, such as issues, pull requests, releases, security alerts or discussions, happen in it, or to ignore all notifications for it. Watch settings are configured on the repository page or on your watching page.
A consultant wants to share a configuration script with one client. It contains details that must stay confidential to that client, and she plans to create a secret gist and send the link. What should she know?
AIt isn't private: anyone with the URL can view it, so a private repository fits better
BA secret gist can be viewed only by members of her organization
CA secret gist is visible only to the people she invites, so it fits the need
DA public gist is safer, because it is listed in Discover where she can see it
Show the answer and why
AIt isn't private: anyone with the URL can view it, so a private repository fits better
Correct
Secret gists stay out of Discover and search, but anyone with the URL can see them.
BA secret gist can be viewed only by members of her organization
Incorrect
Gists aren't limited to an organization's members.
CA secret gist is visible only to the people she invites, so it fits the need
Incorrect
Secret gists have no invite list; the URL is enough to view one.
DA public gist is safer, because it is listed in Discover where she can see it
Incorrect
A public gist is shown to everyone, the opposite of what she needs.
Gists can be public or secret. Public gists appear in Discover and are searchable. Secret gists don't appear in Discover and aren't searchable, but they aren't private: anyone with the URL can see them. To keep code away from prying eyes, create a private repository instead.
A product owner has one large issue, "Launch the mobile checkout", and wants to split it into smaller issues that show their relationship to it and their own progress. What should she use?
AA tasklist block in the issue description
BA milestone named after the large issue
CSub-issues added to the large issue
DA discussion in the Ideas category
Show the answer and why
AA tasklist block in the issue description
Incorrect
Tasklist blocks are retired; sub-issues replace them.
BA milestone named after the large issue
Incorrect
A milestone doesn't make issues children of another issue.
CSub-issues added to the large issue
Correct
Sub-issues break larger pieces of work into smaller issues that show their relationship to the parent.
DA discussion in the Ideas category
Incorrect
A discussion holds a conversation, not a hierarchy of issues.
You can add sub-issues to an issue to break down larger work into smaller issues. Sub-issues show their relationship to the parent, can have sub-issues of their own, and their progress is available in projects. Sub-issues replace the retired tasklist blocks.
A developer plans her GitHub Pages sites. Which two statements are true? (Choose TWO.)
AShe can publish as many personal sites as she likes at <owner>.github.io, one per repository
BHer personal site must live in a repository named <username>.github.io
CPages sites can only use the github.io domain
DPages must not host an online store or other site mainly for commercial transactions
EEach repository can publish up to five project sites
Show the answer and why
AShe can publish as many personal sites as she likes at <owner>.github.io, one per repository
Incorrect
There is a maximum of one user site per account.
BHer personal site must live in a repository named <username>.github.io
Correct
User and organization sites live in a repository named <owner>.github.io.
CPages sites can only use the github.io domain
Incorrect
You can also use your own custom domain.
DPages must not host an online store or other site mainly for commercial transactions
Correct
GitHub Pages isn't intended or allowed as free hosting for an online business or e-commerce site.
EEach repository can publish up to five project sites
Incorrect
There is a maximum of one project site per repository.
There are two types of GitHub Pages sites: user and organization sites, stored in a repository named <owner>.github.io with a maximum of one per account, and project sites, one per repository. Sites can use github.io or a custom domain. GitHub Pages is not intended for, or allowed to be used as, free hosting for an online business, e-commerce site or other site primarily directed at commercial transactions.
AA proposal to merge changes, discussed and reviewed before merging
BA request for read access to a private repository
CA copy of a repository under another account
DA notification telling watchers that a repository has received new commits
Show the answer and why
AA proposal to merge changes, discussed and reviewed before merging
Correct
Pull requests are GitHub's key collaboration feature for proposed changes.
BA request for read access to a private repository
Incorrect
Access is managed through roles and invitations.
CA copy of a repository under another account
Incorrect
That is a fork.
DA notification telling watchers that a repository has received new commits
Incorrect
Notifications report activity; they aren't proposals.
Pull requests are proposals to merge code changes into a project. They let you discuss and review changes before merging, which helps teams catch issues early and maintain code quality.
Maintainers want their community to vote between three proposed release dates. Which GitHub feature supports this directly?
AA release with a voting form in its notes
BA poll in GitHub Discussions
CA gist
DAn issue template
Show the answer and why
AA release with a voting form in its notes
Incorrect
Releases package software.
BA poll in GitHub Discussions
Correct
Discussions can gauge community opinion with polls.
CA gist
Incorrect
Gists share snippets of code.
DAn issue template
Incorrect
Templates shape new issues.
GitHub Discussions gives a project's community a central place for conversations about the project's direction, and you can gauge community opinion using polls, which suits a vote between proposed dates.
Which GitHub feature is designed for tracking bugs, feature ideas and tasks in a repository?
AIssues
BGists
CGitHub Pages
DStars
Show the answer and why
AIssues
Correct
Issues track bug reports, new features, ideas and tasks.
BGists
Incorrect
Gists share snippets.
CGitHub Pages
Incorrect
Pages publishes websites.
DStars
Incorrect
Stars bookmark repositories.
You can create issues in a repository to plan, discuss and track work: bug reports, new features and ideas, and anything else you need to write down or discuss with your team.
A user named octocat publishes a GitHub Pages project site from her repository named docs-site. At which default address is it served?
Adocs-site.github.io
Bgithub.com/octocat/docs-site/pages
Coctocat.github.io/docs-site
Doctocat.github.com/docs-site
Show the answer and why
Adocs-site.github.io
Incorrect
A project site is served under the owner's address, not its own subdomain.
Bgithub.com/octocat/docs-site/pages
Incorrect
That is a path in the repository, not the Pages address.
Coctocat.github.io/docs-site
Correct
Project sites are served at <owner>.github.io/<repositoryname>.
Doctocat.github.com/docs-site
Incorrect
Pages sites use the github.io domain by default.
Project sites are published by default at http(s)://<owner>.github.io/<repositoryname>, so octocat's docs-site repository is served at octocat.github.io/docs-site.