Skip to content

Commit 6083fc6

Browse files
authored
Merge pull request #23170 from github/repo-sync
repo sync
2 parents ed2495e + 895e1de commit 6083fc6

7 files changed

Lines changed: 73 additions & 3 deletions

File tree

122 KB
Loading
110 KB
Loading

content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ This example has a job called `Get_OIDC_ID_token` that uses actions to request a
7070

7171
This action exchanges a {% data variables.product.prodname_dotcom %} OIDC token for a Google Cloud access token, using [Workload Identity Federation](https://cloud.google.com/iam/docs/workload-identity-federation).
7272

73+
{% raw %}
7374
```yaml{:copy}
7475
name: List services in GCP
7576
on:
@@ -97,3 +98,4 @@ jobs:
9798
gcloud auth login --brief --cred-file="${{ steps.auth.outputs.credentials_file_path }}"
9899
gcloud config list
99100
```
101+
{% endraw %}

content/get-started/using-git/about-git.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ git push --set-upstream origin main
129129

130130
### Example: contribute to an existing branch on {% data variables.product.product_name %}
131131

132-
This example assumes that you already have a project called `repo` already on the machine and that a new branch has been pushed to {% data variables.product.product_name %} since the last time changes were made locally.
132+
This example assumes that you already have a project called `repo` on the machine and that a new branch has been pushed to {% data variables.product.product_name %} since the last time changes were made locally.
133133

134134
```bash
135135
# change into the `repo` directory

content/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ In open source projects, forks are often used to iterate on ideas or changes bef
3535

3636
{% data reusables.repositories.private_forks_inherit_permissions %}
3737

38-
If you want to create a new repository from the contents of an existing repository but don't want to merge your changes upstream in the future, you can duplicate the repository or, if the repository is a template, use the repository as a template. For more information, see "[Duplicating a repository](/articles/duplicating-a-repository)" and "[Creating a repository from a template](/articles/creating-a-repository-from-a-template)".
38+
If you want to create a new repository from the contents of an existing repository but don't want to merge your changes to the upstream in the future, you can duplicate the repository or, if the repository is a template, you can use the repository as a template. For more information, see "[Duplicating a repository](/articles/duplicating-a-repository)" and "[Creating a repository from a template](/articles/creating-a-repository-from-a-template)".
3939

4040
## Further reading
4141

content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-on-behalf-of-an-organization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To create commits on behalf of an organization:
2525
- `org` is the organization's login
2626
- `name@organization.com` is in the organization's domain
2727

28-
Organization's can use the `name@organization.com` email as a public point of contact for open source efforts.
28+
Organizations can use the `name@organization.com` email as a public point of contact for open source efforts.
2929

3030
## Creating commits with an `on-behalf-of` badge on the command line
3131

content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,79 @@ remote: error: Required status check "ci-build" is failing
3838

3939
{% ifversion fpt or ghae or ghes or ghec %}
4040

41+
## Conflicts between head commit and test merge commit
42+
4143
Sometimes, the results of the status checks for the test merge commit and head commit will conflict. If the test merge commit has a status, the test merge commit must pass. Otherwise, the status of the head commit must pass before you can merge the branch. For more information about test merge commits, see "[Pulls](/rest/reference/pulls#get-a-pull-request)."
4244

4345
![Branch with conflicting merge commits](/assets/images/help/repository/req-status-check-conflicting-merge-commits.png)
4446
{% endif %}
4547

48+
## Handling skipped but required checks
49+
50+
Sometimes a required status check is skipped on pull requests due to path filtering. For example, a Node.JS test will be skipped on a pull request that just fixes a typo in your README file and makes no changes to the JavaScript and TypeScript files in the `scripts` directory.
51+
52+
If this check is required and it gets skipped, then the check's status is shown as pending, because it's required. In this situation you won't be able to merge the pull request.
53+
54+
### Example
55+
56+
In this example you have a workflow that's required to pass.
57+
58+
```yaml
59+
name: ci
60+
on:
61+
pull_request:
62+
paths:
63+
- 'scripts/**'
64+
- 'middleware/**'
65+
jobs:
66+
build:
67+
runs-on: ubuntu-latest
68+
strategy:
69+
matrix:
70+
node-version: [12.x, 14.x, 16.x]
71+
steps:
72+
- uses: actions/checkout@v2
73+
- name: Use Node.js ${{ matrix.node-version }}
74+
uses: actions/setup-node@v2
75+
with:
76+
node-version: ${{ matrix.node-version }}
77+
cache: 'npm'
78+
- run: npm ci
79+
- run: npm run build --if-present
80+
- run: npm test
81+
```
82+
83+
If someone submits a pull request that changes a markdown file in the root of the repository, then the workflow above won't run at all because of the path filtering. As a result you won't be able to merge the pull request. You would see the following status on the pull request:
84+
85+
![Required check skipped but shown as pending](/assets/images/help/repository/PR-required-check-skipped.png)
86+
87+
You can fix this by creating a generic workflow, with the same name, that will return true in any case similar to the workflow below :
88+
89+
```yaml
90+
name: ci
91+
on:
92+
pull_request:
93+
paths-ignore:
94+
- 'scripts/**'
95+
- 'middleware/**'
96+
jobs:
97+
build:
98+
runs-on: ubuntu-latest
99+
steps:
100+
- run: 'echo "No build required" '
101+
```
102+
Now the checks will always pass whenever someone sends a pull request that doesn't change the files listed under `paths` in the first workflow.
103+
104+
![Check skipped but passes due to generic workflow](/assets/images/help/repository/PR-required-check-passed-using-generic.png)
105+
106+
{% note %}
107+
108+
**Notes:**
109+
* Make sure that the `name` key and required job name in both the workflow files are the same. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions)".
110+
* The example above uses {% data variables.product.prodname_actions %} but this workaround is also applicable to other CI/CD providers that integrate with {% data variables.product.company_short %}.
111+
112+
{% endnote %}
113+
46114
It's also possible for a protected branch to require a status check from a specific {% data variables.product.prodname_github_app %}. If you see a message similar to the following, then you should verify that the check listed in the merge box was set by the expected app.
47115

48116
```

0 commit comments

Comments
 (0)