Work with GitHub pull requests and issues
Users—both internal and external—can use the Edit this page
experienceleague.adobe.com articles.
github.com/AdobeDocs (the public mirror). Instead, make the changes on github.com/Adobe-Enterprise-Docs (GHEC). You can either copy the PR to GHEC using a script, or you make the edits manually. Then close the pull request on the github.com mirror without merging.For details about how you or other users can log issues or edit pages on GitHub, see the Adobe Contributor Guide.
Summary of what Adobe writers should do
Enterprise Git (github.com/Adobe-Enterprise-Docs) and Public Git (github.com/adobedocs) are different environments that require different log-in accounts and have different configuration settings.
To watch a video, see Working with public mirrors.
-
Sign up for
GitHub.com(different from GHEC).If you don’t already have a GitHub account, go to https://github.com/join. We recommend that you use your Adobe email address with a personal (non-LDAP) password.
-
Sign up for GitHub notifications
Go to your public repo on github.com and choose Watching. You’ll get notifications when users log issues or submit pull requests.
-
Contact the SSE team to be added as an admin to the public repo. Let us know your github.com account name.
When we add you as an admin, you’ll be able to close issues and pull requests in your public repo.
Sign up for GitHub notifications github-notifications
Keep in mind that notification settings for github.com/Adobe-Enterprise-Docs and github.com/adobedocs are different and require different log-in accounts and separate configurations.
You can enable notifications so that you get an email message whenever anyone logs an issue or submits a pull request for the public docs on github.com.
- Go to your repo on GitHub.
- From the Watch (or Unwatch) pull-down menu, choose Watching to receive notifications.
By default, you don’t get notifications whenever you make changes to the repo, just when other people do.
If you want different access rights, such as the ability to close issues or pull requests on github.com, contact the SSE team.
Monitor incoming contributions
In order to keep track of all incoming contributions:
Authors should watch their repo, both corp (git.corp.adobe.com) and public (github.com). See Sign up for GitHub notifications.
The workflow for managaging pull requests differs for corp and public, so make sure that you have a method for identifying public GitHub.com requests. For example, in email notifications, Corp notifications include a colored icon, whereas public GitHub.com requests include a black-and-white icon.
React to the contributions as they come in:
- For logged issues, make any necessary change to the documentation and reply to the issue as appropriate.
- For public pull requests, work out a process with the SSE team. By default, an SSE team member should evaluate the pull request and copy it from the public repo to the corp repo. Depending on your team size and level of expertise, you might want to change this workflow. Please contact an SSE team member (usually Bob or Alva) and ask them about copying public PRs.
If you work on a project with multiple team members, consider setting up a triage system. For an example, see the AEM team’s Managing Contributions wiki workflow.
GitHub > Jira workflow github-jira-workflow
The AEM team created an automation process to auto-generate JIRA tickets from any issue logged in the GitHub.com repo. This workflow allows support operators to use the GitHub Log an issue feature as their point of entry in reporting documentation issues.
Contact the SSE team if you’re interested in a similar implementation.
Copy GitHub pull request to Git Corp (Admin) copy-github-pr
This process is for the SSE team or for anyone else who wants to copy a pull request from GitHub to Git Corp. If you want to copy pull requests yourself, let the SSE team know so that we don’t duplicate efforts.
To watch a video, see Copying pull requests from public mirror to corp.
-
Open GitHub Desktop (or your client of choice) and make sure that your local clone is up-to-date.
-
Open Terminal or your favorite command-line tool.
-
Use the following command lines to go to the GitHub repo directory, create a branch on your local drive based on the main branch, and push the changes from GitHub to that new branch on your local drive.
code language-none cd Documents/GitHub/<repo-name> git checkout -b <user>-<branch> main git pull --no-rebase https://github.com/<org>/<repo-name>.git <branch>note NOTE Recent security changes in Github caused us to change git pullin the third line togit pull --no-rebase.Replace
<reponame>,<user>,<branch>, and<org>with information from GitHub pull request. The<org>variable depends on whether the GitHub pull request is from a fork (more common) or from a branch (internal Adobe users with write access). If there is a branch, useAdobeDocsfor<org>. If there is a fork, use the<user>value. See the examples below.code language-none cd Documents/GitHub/target.en git checkout -b mtalbot29-patch-2 main git pull --no-rebase https://github.com/mtalbot29/target.en.git patch-2 -
Go to GitHub Desktop and push the newly added branch to the server.
-
Create a pull request. Best practice is to copy the link to the public PR in the comments field for reference.
-
(Writer) Validate, edit (if necessary), and merge when ready.
-
(Writer or SSE) Close the pull request on the GitHub repo with thank you comment.
Example Details
Suppose you have the following pull request.
In this example, the mtalbot29 user created the pull request in a fork (also mtalbot29) in the patch-2 branch in the target.en repo.
cd Documents/GitHub/target.en
git checkout -b mtalbot29-patch-2 main
git pull --no-rebase https://github.com/mtalbot29/target.en.git patch-2
The first line goes to the target.en directory.
The second line creates a branch in the target.en directory called mtalbot29-patch-2 based on the main branch.
The third line copies the edits from the public repo to your local directory and commits the files to the mtalbot-patch-2 branch.
Follow the steps above to complete pull request and merge into main.
Create a public git mirror (SSE team) create-public-git
Before you go public with a repository, you need to create a public git mirror repository that contributors can work with. This is the repository that is linked to for Edit this Page or Log an Issue in the right rail of every article.
In addition, after creating the public mirror, in the metadata.md file of the repo that you’re launching, you need to make sure the git-repo setting address goes to your mirror repo.
-
Make sure that
git-repo: <repo-name>is specified in the repo’s metadata.md file. -
Go to https://github.com/Adobe-Enterprise-Docs/workflows/actions/workflows/create-public-mirror-repos.yml, choose Run Workflow, and specify the repo name.
This creates all 10 public mirror repos if they don’t already exist.
-
Add the mirror.yml file to the .github > workflows folder.
The .github folder is a hidden system file, so press
Cmd+Shift+.on a Mac to toggle hide/unhide system files.