Skip to content

Commit

Permalink
ci(label): debug repo name on dispatching
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Dec 18, 2023
1 parent 7250b39 commit 513260c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/actions/label/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

const [owner, repo] = ["gear-tech", "gear"];
const { LABEL, REF, HEAD_SHA, TITLE, NUMBER, IS_FORK, REF_NAME } = process.env;
const { LABEL, REF, HEAD_SHA, TITLE, NUMBER, REPO, REF_NAME } = process.env;
const linux =
LABEL === "A0-pleasereview" ||
LABEL === "A4-insubstantial" ||
Expand All @@ -24,8 +24,8 @@ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
* @returns {Promise<[boolean, string]>} [skip, String(check_runs)]
**/
const skip = async ({ github, core }) => {
core.info("Checking if need to skip dispatch from ${REF_NAME}, is fork: ${IS_FORK}");
if (!IS_FORK && REF_NAME.startsWith("dependabot")) return [true, ""]
core.info(`Checking if need to skip dispatch from ${REPO}:${REF_NAME}`);
if (REPO === "gear-tech/gear" && REF_NAME.startsWith("dependabot")) return [true, ""]

const {
data: { check_runs },
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
REF_NAME: ${{ github.ref_name }}
TITLE: ${{ github.event.pull_request.title }}
NUMBER: ${{ github.event.number }}
IS_FORK: ${{ github.event.pull_request.head.repo.full_name != 'gear-tech/gear' }}
REPO: ${{ github.event.pull_request.head.repo.full_name }}
with:
script: |
const script = require('./.github/actions/label/build.js');
Expand Down

0 comments on commit 513260c

Please sign in to comment.