Skip to content

Commit afb871e

Browse files
authored
Refactor CI for forked repositories - Fix (yoanm#118)
1 parent 66a9750 commit afb871e

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/src/cleanup.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const github = require('@actions/github'); // @TODO move to 'imports from' when moved to TS !
22
const core = require('@actions/core');
33

4-
const {GITHUB_REPOSITORY} = process.env;
4+
// @TODO Find a way to retrieve current job (add the jobId as state to re-use it here !) and forward the annotations as Check run `details_text`
55

66
async function run() {
77
if (core.getState('check-run-already-concluded').length > 0) {
@@ -19,13 +19,11 @@ async function run() {
1919
const requestParams = await core.group(
2020
'Build API params',
2121
async () => {
22-
const [repoOwner, repoName] = GITHUB_REPOSITORY.split('/');
23-
2422
return {
2523
conclusion: jobStatus,
2624
// Url path parameters
27-
owner: repoOwner,
28-
repo: repoName,
25+
owner: github.context.repo.owner,
26+
repo: github.context.repo.repo,
2927
check_run_id: checkRunId
3028
};
3129
}

.github/actions/reports-group/fetch-workflow-metadata-action/dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/fetch-workflow-metadata-action/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/node-gha-helpers/src/workflow-run-context.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ export const getWorkflowName = () => ghaEvent.workflow.name;
4141
/**
4242
* @returns {string}
4343
*/
44-
export const getRunId = () => ghaEvent.workflow.id.toString();
44+
export const getRunId = () => ghaEvent.workflow_run.id.toString();

0 commit comments

Comments
 (0)