-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSOE-158: Evaluate using the Check Spelling action #27
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Piedone
reviewed
Jul 22, 2022
Piedone
reviewed
Jul 22, 2022
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view or the 📜action log for details. Unrecognized words (2)CLOUDSMITH Previously acknowledged words that are now absentabcdefghijklmnopqrstuvwxyz Activatable airbnb Antiforgery apiclienttenant apps appsettings ASPNETCORE autocompletion autorun bacpac basethemesample beforeunload blog bootstraptab browsersync btn buble CDNs certs chainable chartjs chmod chown Chro chromedriver cjs Cloudflare cloudsmith Cms codeanalysis codemirror codestyle colorfield commonjs Configurator contentfiles contextmenu createstate cref crlf csharp ctx cwd darkmode datalabels datatable deactivatable deconstructed Demystifier Deployer destructuring devblogs dotnet EACCES ecma editorconfig emails Embedd enableextensions Enums esm EULA eur executesql facebook falsey favicon fff Firefox fixme flakyness Formattable frontend GDPR geckodriver Giraudel gitattributes github gitmodules globals Gulpfile hackish haspopup Hastlayer homepage Hsl hsva htmlvalidate https IAction IAdmin IAlter IAntiforgery IApplication IAsync IAudit IAuthorization IBab IBackground ICaching ICant icbin IChange IClass IClock ICollection IColumn ICompare IConfiguration IConfigure IConsent IContent IControl IConvertible ICreate ICss ICustom IData IDate IDb IDeferred IDeployment IDictionary IDisplay IDisposable IDistributed IDocument IDriver idx IDynamic IEmail IEndpoint IEquatable IExtension IFailure IFeature IFile IForm IFormat IGlobal IGraph IGrouping IHas IHost IHtml IHttp IIdentity iife IIndex iis ILast ILayout ILiquid ILocal ILog ILogger ILogin ILookup IManual IMarkdown IMedia IMemory IMock IModel IModule IMonkey IMy INavigation INotifier Intelli IntelliSense Interop Interoperability IObject IOperation IOptions IOrchard IPermission IPlacement IPost IPrivacy IProxy ipsum IQuery IQueryable IRead IRecipe IRegistration IRequest IResource IRole IRunning ISchema IScoped ISearch ISecurity ISerializable IService ISession ISet IShape ISite IString ITaxonomy itemprop ITenant ITest ITracking IUser IWeb jetbrains JObject json jsoneditor jsoneditoronline JToken labelledby length'l linebreak linkedin linq linting linux localhost lockfile Lombiq lookbehind Lucene markdownlint mcr mediatheme mentoring metadata Meziantou middlewares mixin mkdir msbuild mscorlib msedgedriver mso multiline multisubmit mvc MVVM myapp Namespaced navbar ndproj Newtonsoft NLog nologo NONINFRINGEMENT NPM npx NVARCHAR omnisharp onspecial onwarn orchardcore OSOCE parallelizable pickr plugin plusplus pnpm popstate Portainer postclean pragma prebuild preheader pwsh readdir Reappend refactoring registrationhttpevent registrationworkflow Reks Rekt RHEL rolename Rowling RSPEC ruleset Schoorstra screenshots sdk search'f Serializer setlocal sfc SFCs Shouldly Sipke sln sourced sourcemaps sql sqlcmd standalone stroustrup stylecop stylelint stylelintrc subfolders submenu sudoing superproject SUSE tanspiled taxonomyfield TClass testid TGenerator thetheme TImplementation TIndex TKey TMigration TModel todo Toolset TPage TProvider Trumbowyg tundora TUser TValue uncached Uncomment uninstall untick uri urijs USERPROFILE userspace utf versioning visualstudio visualstudioextension vuejs vuelidate walkthrough warnaserror webapp workaround workflow wpf XDG xpath xsessionrc xunit xxl yaml ymlTo accept ✔️ these unrecognized words as correct and remove the previously acknowledged and now absent words, run the following commands... in a clone of the git@github.com:Lombiq/GitHub-Actions.git repository update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}
(
artifact_dir=$(mktemp -d)
gh_err=$(mktemp)
if gh run download -D "$artifact_dir" -R Lombiq/GitHub-Actions 3280220943 -n check-spelling-comment 2> "$gh_err"; then
patch_remove=$(unzip -p "$artifact_dir/artifact.zip" remove_words.txt 2>/dev/null)
patch_add=$(unzip -p "$artifact_dir/artifact.zip" tokens.txt 2>/dev/null)
should_exclude_patterns=$(unzip -p "$artifact_dir/artifact.zip" should_exclude.txt 2>/dev/null | perl -pe 's{^(.*)}{^\\Q$1\\E\$}')
update_files
elif grep -q "no valid artifacts found to download" "$gh_err"; then
if [ "$(gh api /repos/Lombiq/GitHub-Actions/actions/runs/3280220943/artifacts -q '.artifacts.[]|select(.name=="check-spelling-comment")|.expired')" = "true" ]; then
echo "Run artifact expired. You will need to trigger a new run."
else
echo "Run may not have completed. If so, please wait for it to finish and try again."
fi
elif grep -q "no artifact matches any of the names or patterns provided" "$gh_err"; then
echo "unexpected error, please file a bug to https://github.com/Lombiq/GitHub-Actions/issues/new"
cat "$gh_err"
else
echo "unknown error, please file a bug to https://github.com/Lombiq/GitHub-Actions/issues/new"
cat "$gh_err"
fi
)
git add -u
|
Piedone
requested changes
Oct 20, 2022
Piedone
requested changes
Oct 21, 2022
Piedone
requested changes
Oct 24, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #27 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OSOE-158
Fixes #37.