mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[PR #1582] [MERGED] feat: allow overriding of GITHUB_ env variables #2014
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#2014
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/1582
Author: @shubhbapna
Created: 1/24/2023
Status: ✅ Merged
Merged: 2/3/2023
Merged by: @mergify[bot]
Base:
master← Head:issue-1424📝 Commits (8)
536d0d7allow overriding of GITHUB_ env variablese11c99cbug fix for overriding env vars with empty stringe59031drevert step.gof960691refactor github_context to prevent lint failures. added more setters61da1b1added ability to override github env variables1e4399dMerge branch 'master' into issue-1424f3152fbhandled base and head ref1a6d8e2Merge branch 'master' into issue-1424📊 Changes
3 files changed (+199 additions, -74 deletions)
View changed files
📝
pkg/model/github_context.go(+65 -6)📝
pkg/model/github_context_test.go(+94 -25)📝
pkg/runner/run_context.go(+40 -43)📄 Description
Fixes #1424
By loading the
GITHUB_env variables before we load the user provided env variables, we can let them override these variables.I ended up doing a little bit of refactoring as well to keep the linter happy about the cyclomatic complexity of
getGithubContext. I shifted the logic of setting some of the variables togithub_context.go🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.